I'm currently trying to get the same estimation results as the paper "Seasonal Changes in Central England Temperatures - Proietti & Hillebrand (2015)"
In this model they define the following state space model which I've rewritten using the "standard" state space equations from Koopman & Durbin (2012). The blue variables are the ones that need to be estimated, the expected results are reported in the first paper (page 14).
A very small summary to understand the model: y_t is a 1xT vector with data per month, X_t is a 12x1 "selection" vector, such that y_t allows for different values of the parameters per month that it is in.
I've tried estimating the model first while ignoring the X_t matrix which gave a few errors initially... For example, the first element in Q was not allowed to be zero, which is weird in my opinion.. \mu has no innovations and hence no variance for the innovation vector, right ? Also, even with 1,000 iterations, convergence is still not reached. I think I will try to go for 10,000 iterations tomorrow morning, perhaps that will help.
However, the main thing that has me stumped is how to allow for X_t in this state space model.. this will in turn change the model to 60 parameters (since each parameter is a 12x1 vector). Any help would be lovely :)
library(KFAS)
yTOT = yTOT[yTOT$YR > 1771,]
yTOT = yTOT[yTOT$YR < 2014,]
y = t(as.matrix(yTOT$VAL))
B = matrix(list(0,"b1",0,0,1,0,0,0,"b2"),3,3, byrow=TRUE)
U = matrix(list("u1",0,0),3,1)
C = 0
c = 0
G = matrix(list(1,0,0, 0,1,0, 0,0,1),3,3, byrow=TRUE)
w = matrix(list(0,"w1","w2"),3,1)
Z = matrix(c(1,0,1),1,3)
A = matrix(0, 1,1)
D = 0
d = 0
H = 0
v = 0
R = matrix(0, 1,1)
Q = matrix(list(1,0,0, 0,1,0, 0,0,"q1"),3,3, byrow=TRUE)
x0 = matrix(0, 3,1)
V0 = matrix(0, 3,3)
model.gen=list(Z=Z,A=A,R=R,B=B,U=U,Q=Q,x0=x0,V0=V0,tinitx=0)
kemfit = MARSS(y, model=model.gen, control=list(maxit=1000))