Learn R Programming

KFAS (version 0.9.9)

fitSSM: Maximum Likelihood Estimation of a State Space Model

Description

Function fitSSM finds the maximum likelihood estimates for unknown parameters of an arbitary state space model if an user defined model building function is defined. As a default, fitSSM estimates the non-zero elements, which are marked as NA, of the time-invariant covariance matrices H and Q of the given model.

Usage

fitSSM(inits, model = NULL, modFun = NULL,
    method = "BFGS", nsim = 0, antithetics = TRUE,
    taylor = TRUE, theta = NULL, maxiter = 500, ...)

Arguments

inits
Initial values for optim
model
Model object of class SSModel. if ModFun is defined, this argument is ignored.
modFun
User defined function which builds the model of class SSModel given the parameters. If NULL, default estimation procedure is used (See details).
method
The method to be used in optim. Default is "BFGS".
nsim
Number of independent samples used in estimating the log-likelihood of the non-gaussian state space object. Default is 0, which gives good starting value for optimisation. Only used in case of non-Gaussian state space model.
antithetics
Logical. If TRUE, two antithetic variables are used in simulations, one for location and another for scale. Default is TRUE. Only used in case of non-Gaussian state space model.
taylor
Logical. If TRUE, control variable based on Taylor approximation is used. Default is TRUE. Only used in case of non-Gaussian state space model.
theta
Initial values for conditional mode theta. Default is object$y. Only used in case of non-Gaussian state space model.
maxiter
Maximum number of iterations used in linearisation. Only used in case of non-Gaussian state space model.
...
Optional arguments for functions optim and modFun.

Value

  • A list with elements
  • optim.outOutput from function optim.
  • modelModel with estimated parameters.