Hippo's data
[시계열 분석] ARIMA Model 본문
해당 포스팅은 김성범 교수님의 ARIMA 모델 개요 - Part 1 강의를 기반으로 작성되었습니다!
https://www.youtube.com/watch?v=ma_L2YRWMHI
-> AR,MA,ARMA 모델 구현 위해 데이터가 stationary 해야함
그렇다면 stationary / Nonestationary 란 무엇일까?
# Stationary Process(정상 프로세스)
→ 안정되어 있는 상태
→ 시간에 관계없이 평균과 분산이 일정한 시계열 데이터
# Nonestationary Process (비정상 프로세스)
# 정상성 확인 Stationary
복잡한 데이터 → 눈으로 판단하기 힘듦
→ ACF(Autocorrelation Function) plot 으로 확인
→ x축 lag / y축 Autocorrelation (자기 자신, 자기자신 이전 데이터와의 correlation)
lag1 : 현재 데이터와 한시점 미룬 데이터와의 차이
lag2 : 2시점 미룬(shift)
…
lag20 : 20시점 미룬(shift)
ACF(Autocorrelation Function) plot 해석
일정한 패턴 X / 갑자기 증감 → stationary
일정한 패턴 O / 전반적으로 천천히 감소 → Nonestationary
-> Stationary 만족
-> ACF plot 천천히 감소 -> Nonestationary
-> ACF plot 전반적으로 감소 추세 -> Nonestationary
< AR, MA, ARIMA Model>
# Autoregressive (AR) Model
→ Models that use lags of the dependent variable as independent variables
→ y_t의 과거 lag된 변수들로 회귀모델 생성]
y 자기자신으로 모델링하므로 오차항들이 서로 독립X
→ 파이추정(계수값, 파라미터)→ 최소제곱법(OLS) 으로 추정 X
# Moving Average (MA) Model
→ Models that use past errors that follow a white noise distribution as explanatory variables.
→ y_t의 과거 error 변수들로 회귀모델 생성
# Autoregressive and Moving Average (ARMA) Model
→ AR + MA
→ y_t의 과거 lag된 변수들(p개) + 과거 error 변수들(q개)로 회귀모델 생성
# Autoregressive Integrated Moving Average (ARIMA) Model
Autoregressive(AR) Integrated(I) Moving Average(MA)
→ ARIMA
AR(p) / I(d) / MA(q)
→ ARIMA (p,d,q)
p → 과거 관측값 수 / AR model
d→ differencing(차분) 수
q→ 과거 오차항 수 / MA model
# Differencing(차분)
Nonestationary → stationary 방법
Differencing(차분) : 현 시점 데이터에서 d시점 이전 데이터를 뺀 것
1차 차분→ t 시점 1시점 전(shift)의 데이터와의 차이
2차 차분→ t 시점 2시점 전(shift)의 데이터와의 차이
…
d차 차분 → t 시점 d시점 전(shift)의 데이터와의 차이
# ARIMA - Order of Differncing / 차분 수 판단
오리지널 데이터 stationary / Nonestationary 판단
stationary → 차분(Differencing) 필요없음
Nonestationary →
일정한 증/감 → 1차차분 (대부분)
복잡한 패턴 → 2차차분
→ 대부분의 데이터는 2차차분으로 충분함
→ 3차차분이상 가는 데이터는 ARIMA 모델 적합하지 X 데이터로 판단
예제) 1st Differencing (1차차분)
예제) 2st Differencing (2차차분)
→ 1차분으로도 충분함 → 굳이 2차차분 필요 X
→ ACF(Autocorrelation Function) plot 확인
→ stationary 만족
<요약>
AR,MA,ARMA 모델 적용 위해 데이터가 stationary 해야함
stationary 확인 → ACF(Autocorrelation Function) plot
AR,MA,ARIMA model 특성
Nonestationary → 차분(Differencing) 진행
'Time Series Analysis (시계열 분석)' 카테고리의 다른 글
[시계열 분석] ARIMA Procedure, SARIMA (0) | 2025.02.13 |
---|---|
[시계열 분석] Time Series Regression (0) | 2025.02.10 |