블로그 보관함

레이블이 ts인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ts인 게시물을 표시합니다. 모든 게시물 표시

2011년 12월 6일 화요일

MA(q) 모형 적합

시계열. MA(q) 모형. 최소제곱추정법.

MA(1) 모형을 상수항 없이 \[ x_t = \epsilon_t - \theta \epsilon_{t-1}, \quad \epsilon_t \sim \textit{WN}(0, \sigma^2) \] 이라고 하자. \[ \epsilon_t = x_t + \theta \epsilon_{t-1} \] 이므로 최소제곱법으로 추정량 $\hat\theta$를 구하기 위해 \[ S(\theta) = \sum_{t=1}^n \epsilon_t^2 = \sum_{t=1}^n (x_t - \theta\epsilon_{t-1})^2 \] 를 최소로 하는 $\theta$를 찾을 수 있다. 그런데 $\epsilon_t$가 $\theta$에 따라 달라지므로 위 식은 간단히 풀릴 수가 없다. $\epsilon_t$가 $\theta$의 함수라는 사실을 드러내기 위해 $\epsilon_t(\theta)$로 표기하자. 이 함수가 어떤 함수인지 모르지만 테일러 전개를 해서 1차 함수로 근사하면 위 식을 쉽게 풀 수 있을 것이다. $\epsilon_t(\theta)$를 어떤 상수 $\theta^*$에서 테일러 전개를 1차항까지만 하면 다음과 같다. \[ \epsilon_t(\theta) \approx \epsilon_t(\theta^*) + (\theta - \theta^*) \omega_t(\theta^*), \qquad \omega_t(\theta) = \frac{\partial \epsilon_t(\theta)}{\partial \theta} \] 이제 이것을 이용하며 $S(\theta)$를 나타내면 \[ S(\theta) = \sum_{t=1}^n [\epsilon_t(\theta^*) + (\theta-\theta^*)\omega_t(\theta^*)]^2 \] 가 된다. 여기서 $\theta^*$은 어떤 상수이고 따라서 $\theta$에 관한 1차식을 제곱한 것의 합에 불과하므로 $S(\theta)$를 최소로 하는 $\theta$를 쉽게 찾아낼 수 있다. 위 식은 \( S(\beta) = \sum_{t=1}^n (y_t - \beta x_t)^2 \) 과 동일한 형태이고 우리는 이때 $S(\beta)$를 최소로 하는 것이 $\beta = S_{XY}/S_{XX}$라는 것을 잘 알고 있다. 즉, \[ \theta - \theta^* = \frac{-\sum_{t=1}^n \epsilon_t(\theta^*)\omega_t(\theta^*)}{\sum_{t=1}^n[\omega_t(\theta^*)]^2} \] 이다. 이 식에서 $\theta^*$에 어떤 초기값 $\theta_{(0)}$을 넣고 계산할 수 있다. 초기값은 예를 들어 적률이용추정량을 사용할 수 있다. 이렇게 해서 얻어지는 $\theta$를 $\theta_{(1)}$라고 하고 이 과정을 계속 반복할 수 있다. 즉,
\[ \theta_{(j+1)} = \theta_{(j)} +
\frac{-\sum_{t=1}^n \epsilon_t(\theta_{(j)})\omega_t(\theta_{(j)})}{\sum_{t=1}^n[\omega_t(\theta_{(j)})]^2} \]
와 같이 충분하다고 생각될 때까지 반복 계산을 하여 $\hat\theta$를 얻을 수 있다.

이때 $\epsilon_t(\theta^*)$, $\omega_t(\theta^*)$를 어떻게 구하는지가 문제가 된다. 우선 $\epsilon_0(\theta)=0$이라고 가정하고 $\epsilon_t(\theta)$를 살펴보자. \begin{align*} \epsilon_t(\theta) &= x_t + \theta \epsilon_{t-1}(\theta) = x_t + \theta (x_{t-1} + \theta \epsilon_{t-2}) = \cdots \\ &= x_t + \theta x_{t-1} + \theta^2 x_{t-2} + \cdots + \theta^{t-1} x_1 + \theta^t \epsilon_0(\theta)\\ &=\sum_{k=0}^{t-1} \theta^k x_{t-k} \end{align*} 여기에서 $x_i$는 관측치이므로 어떤 상수 $\theta^*$에 대해 $\epsilon(\theta^*)$를 구할 수 있다. 그리고 \(\epsilon_t(\theta) = x_t + \theta\epsilon_{t-1}(\theta)\)의 양변을 미분하여 얻어지는 식 또한 점화식의 형태가 되어 동일한 방법으로 계산할 수 있다. \begin{align*} \frac{\partial\epsilon_t(\theta)}{\partial \theta} &= \epsilon_{t-1}(\theta) + \theta \frac{\partial \epsilon_{t-1}(\theta)}{\partial\theta} = \cdots \\ &= \epsilon_{t-1}(\theta) + \theta \epsilon_{t-2}(\theta) + \theta^2 \epsilon_{t-3}(\theta) + \cdots + \theta^{t-2}\epsilon_1(\theta) +\theta^{t-1}\frac{\partial\epsilon_0(\theta)}{\partial \theta}\\ &= \sum_{k=0}^{t-2} \theta^k \epsilon_{t-1-k} \end{align*}