Computes the log-likelihood of the state space model of bssm
package.
# 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, ...)
Model object.
Ignored.
Number of samples for importance sampling. If 0, approximate log-likelihood is returned. See vignette for details.
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 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.
Maximum number of iterations.
Tolerance parameter.