SSModel
creates a state space object object
of class SSModel
which can be used as an input
object for various functions of KFAS
package.SSMarima(ar = NULL, ma = NULL, d = 0, Q, stationary = TRUE, index, n,
ynames)
SSMcustom(Z, T, R, Q, a1, P1, P1inf, index, n)
SSMcycle(period, type, Q, index, a1, P1, P1inf, n, ynames)
SSModel(formula, data, H, u, distribution, tol = .Machine$double.eps^0.5)
SSMregression(rformula, data, type, Q, index, R, a1, P1, P1inf, n, ynames)
SSMseasonal(period, sea.type = c("dummy", "trigonometric"), type, Q, index,
a1, P1, P1inf, n, ynames)
SSMtrend(degree = 1, type, Q, index, a1, P1, P1inf, n, ynames)
formula
containing the symbolic description of the model. The
intercept term can be removed with -1
as in
lm
. In case of trend or differenced arima
cKFAS
.rep('gaussian',p)
..Machine$double.eps^0.5
.'distinct'
or 'common'
states are used for
different series.length(index)
. For trend component, list of
length de
'dummy'
or
'trigonometric'
form of the seasonal component.SSModel
, which is a list with the
following components:SSModel
contains following
attributes:SSMarima
,
SSMcustom
, SSMcycle
, SSMregression
,
SSMseasonal
and SSMtrend
.KFAS
for examples.examplemodel<-SSModel(cbind(y1,y2,y3) ~ x1+x2
+ SSMregression(~-1+x3+x4,data=dataset,type='common',index=c(1,3),Q=diag(c(0.05,0.1)))
+ SSMtrend(degree=1,index=1,Q=list(matrix(0.2)))
+ SSMtrend(degree=2,index=2:3,Q=list(matrix(c(0.2,0.1,0.1,0.2),2,2),diag(0.07,2)))
+ SSMcycle(period=25,Q=matrix(c(0.3,0.2,0.1,0.2,0.4,0.05,0.1,0.05,0.1),3,3))
, data=dataset, H=matrix(c(1,0.7,0.7,0.7,1,0.7,0.7,0.7,1),3,3))
Run the code above in your browser using DataLab