Initial Values for MLE
MARSSinits.Rd
Sets up generic starting values for parameters for maximum-likelihood estimation algorithms that use an iterative maximization routine needing starting values. Examples of such algorithms are the EM algorithm in MARSSkem()
and Newton methods in MARSSoptim()
. This is a utility function in the MARSS-package
. It is not exported to the user. Users looking for information on specifying initial conditions should look at the help file for MARSS()
and the User Guide section on initial conditions.
The function assumes that the user passed in the inits list using the parameter names in whatever form was specified in the MARSS()
call. The default is form="marxss". The MARSSinits()
function calls MARSSinits_foo, where foo is the form specified in the MARSS()
call. MARSSinits_foo translates the inits list in form foo into form marss.
Usage
MARSSinits(MLEobj, inits=list(B=1, U=0, Q=0.05, Z=1, A=0,
R=0.05, x0=-99, V0=5, G=0, H=0, L=0))
Arguments
- MLEobj
An object of class
marssMLE
.- inits
A list of column vectors (matrices with one column) of the estimated values in each parameter matrix.
Details
Creates an inits
parameter list for use by iterative maximization algorithms.
Default 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):
elem=
A,U
A numeric vector or matrix which will be constructed intoinits$elem
by the commandarray(inits$elem),dim=c(n or m,1))
. If elem is fixed in the model, anyinits$elem
values will be overridden and replaced with the fixed value. Default isarray(0,dim=c(n or m,1))
.elem=
Q,R,B
A numeric vector or matrix. If length equals the lengthMODELobj$fixed$elem
theninits$elem
will be constructed byarray(inits$elem),dim=dim(MODELobj$fixed$elem))
. If length is 1 or equals dim ofQ
or dim ofR
theninits$elem
will be constructed into a diagonal matrix by the commanddiag(inits$elem)
. If elem is fixed in the model, anyinits$elem
values will be overridden and replaced with the fixed value. Default isdiag(0.05, dim of Q or R)
forQ
andR
. Default isdiag(1,m)
forB
.x0
Ifinits$x0=-99
, then starting values forx0
are estimated by a linear regression through the count data assumingA
is all zero. This will be a poor start ifinits$A
is not 0. Ifinits$x0
is a numeric vector or matrix,inits$x0
will be constructed by the commandarray(inits$x0),dim=c(m,1))
. Ifx0
is fixed in the model, anyinits$x0
values will be overridden and replaced with the fixed value. Default isinits$x0=-99
.Z
IfZ
is fixed in the model,inits$Z
set to the fixed value. IfZ
is not fixed, then the user must supplyinits$Z
. There is no default.elem=
V0
V0
is never estimated, so this is never used.
Value
A list with initial values for the estimated values for each parameter matrix in a MARSS model in marss form. So this will be a list with elements B
, U
, Q
, Z
, A
, R
, x0
, V0
, G
, H
, L
.
See also
marssMODEL
, MARSSkem()
, MARSSoptim()