margLogLikeSto: Marginal log-likelihood for a stochastic model

View source: R/logLikelihood.r

margLogLikeStoR Documentation

Marginal log-likelihood for a stochastic model

Description

Compute a Monte-Carlo estimate of the log-likelihood of theta for a stochastic model defined in a fitmodel object, using particleFilter

Usage

margLogLikeSto(fitmodel, theta, initState, data, nParticles)

Arguments

fitmodel

a fitmodel object

theta

named numeric vector. Values of the parameters. Names should match fitmodel$thetaNames.

initState

named numeric vector. Initial values of the state variables. Names should match fitmodel$stateNames.

data

data frame. Observation times and observed data. The time column must be named "time" and the observation column must be named "obs".

nParticles

number of particles

Value

Monte-Carlo estimate of the marginal log-likelihood of theta

See Also

particleFilter


sbfnk/fitR documentation built on July 18, 2023, 3:28 p.m.