Learn R Programming

bssm (version 1.0.0)

logLik.ssm_nlg: Log-likelihood of a Non-linear State Space Model

Description

Computes the log-likelihood of the state space model of bssm package.

Usage

# S3 method for ssm_nlg
logLik(
  object,
  nsim,
  method = "bsf",
  max_iter = 100,
  conv_tol = 1e-08,
  iekf_iter = 0,
  seed = sample(.Machine$integer.max, size = 1),
  ...
)

Arguments

object

Model model.

nsim

Number of samples for particle filter. If 0, approximate log-likelihood is returned either based on the gaussian approximation or EKF, depending on the method argument.

method

Sampling method. Default is the bootstrap particle filter ("bsf"). Other choices are "psi" which uses psi-auxiliary filter (or approximating gaussian model in the case of nsim = 0), and "ekf" which uses EKF-based particle filter (or just EKF approximation in the case of nsim = 0).

max_iter

Maximum number of iterations for gaussian approximation algorithm.

conv_tol

Tolerance parameter for the approximation algorithm.

iekf_iter

If iekf_iter > 0, iterated extended Kalman filter is used with iekf_iter iterations in place of standard EKF. Defaults to zero.

seed

Seed for the random number generator.

...

Ignored.