Computes the log-likelihood of a state space model of class ssm_nlg package.
# S3 method for ssm_nlg
logLik(
object,
particles,
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 particles = 0), and "ekf" which
uses EKF-based particle filter (or just EKF approximation in the case of particles = 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.