Learn R Programming

bssm (version 0.1.11)

logLik.gssm: Log-likelihood of the State Space Model

Description

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

Usage

# S3 method for gssm
logLik(object, ...)

# S3 method for ngssm logLik(object, nsim_states, method = "psi", seed = 1, max_iter = 100, conv_tol = 1e-08, ...)

Arguments

object

Model object.

...

Ignored.

nsim_states

Number of samples for importance sampling. If 0, approximate log-likelihood is returned. See vignette for details.

method

Method for computing the log-likelihood of non-Gaussian/non-linear model. Method "spdk" uses the importance sampling approach by Shephard and Pitt (1997), and Durbin and Koopman (1997). "psi" (the default for linear-Gaussian signals) uses psi-auxiliary filter and "bsf" bootstrap filter (default for general non-linear Gaussian models).

seed

Seed for the random number generator. Compared to other functions of the package, the default seed is fixed (as 1) in order to work properly in numerical optimization algorithms.

max_iter

Maximum number of iterations.

conv_tol

Tolerance parameter.