MARSSkem and Newton methods in MARSSoptim. This is a utility function in the MARSS-package.MARSSinits(modelObj, inits=list(B=1, U=0, Q=0.05, Z=1, A=0, R=0.05, x0=-99, V0=5), method)marssm. MARSSinits uses three elements of the model object.
dataThe data element is used to determine n, the dimension of the y in the MARSS modeinits parameter list for use by iterative maximization algorithms.
Defaults values for inits is supplied in MARSSsettings.R. The user can alter these and supply any of the following (m is the dim of X and n is the dim of Y in the MARSS model):
A,Uinits$elem by the command array(inits$elem),dim=c(n or m,1)). If elem is fixed in the model, any inits$elem values will be overridden and replaced with the fixed value. Default is array(0,dim=c(n or m,1)).
Q,R,Barray(inits$elem),dim=dim(modelObj$fixed$elem)). If length is 1 or equals m or n then inits$elem will be constructed into a diagonal matrix by the command diag(inits$elem,m or n). If elem is fixed in the model, any inits$elem values will be overridden and replaced with the fixed value. Default is diag(0.05,m or n) for Q and R. Default is diag(1,m) for B.
x0inits$x0=-99, then starting values for x0 are estimated by a linear regression
through the count data assuming A=0. This will be a poor start if inits$A is not 0. If inits$x0 is a numeric vector or matrix, inits$x0 will be constructed by the command array(inits$x0),dim=c(m,1)). If x0 is fixed in the model, any inits$x0 values will be overridden and replaced with the fixed value. Default is inits$x0=-99.
Zinits$Z set to the fixed value. If Z is not fixed, then the user must supply inits$Z. There is no default.
V0marssm MARSSkem MARSSoptim