Compute the trajectory (log-)likelihood of theta for a deterministic model defined in a fitmodel object by summing the point log-likelihoods.

dTrajObs(fitmodel, theta, initState, data, log = TRUE)

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".

log

logical (default: FALSE); whether the logarithm of the likelihood should be returned

Value

numeric value of the log-likelihood

See also