Suppose I have a time series that is a 3 month moving average of an unknown time series. I need to estimate the underlying time series, using a state space model.
So, suppose Y is the known 3 month moving average time series. I want to find the X time series such that Y_t = (X_t + X_t-1 + X_t-2)/3.
Using state space model, I thought I could you the following specification:
Signal:
y = (x1 + x2 + x3) / 3
States:
x1 = x1(-1) + z
x2 = x1(-1)
x3 = x2(-1)
z = c(2)*z(-1) + e1
So, I've wrote the following specification on EViews:
Code: Select all
param c(1) 1 c(2) 0.2
@ename e1
@evar var(e1) = exp(c(1))
@signal y = (x1 + x2 + x3)/3
@state x1 = x1(-1) + z
@state z = c(2)*z(-1) + e1
@state x2 = x1(-1)
@state x3 = x2(-1)
But I get the following error:"Invalid lags or leads for state variables in state equation @state x1 = x1(-1) + z"