Computes the log-likelihood of the state space model of bssm
package.
# 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),
...
)
Model model.
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.
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
).
Maximum number of iterations for gaussian approximation algorithm.
Tolerance parameter for the approximation algorithm.
If iekf_iter > 0
, iterated extended Kalman filter is used with
iekf_iter
iterations in place of standard EKF. Defaults to zero.
Seed for the random number generator.
Ignored.