Learn R Programming

fitode (version 0.1.1)

logLik.sensitivity: Calculate the derivative of the log-likelihood function

Description

Calculate the derivative of the log-likelihood function with respect to model parameters using sensitivity equations and chain rule

Usage

logLik.sensitivity(
  parms,
  model,
  data,
  solver.opts = list(method = "rk4"),
  solver = ode,
  return.NLL = TRUE,
  return.traj = FALSE
)

Value

a vector of nll and derivative of nll with respect to model parameters (or a list containing (1) the estimated traejctory and (2) a vector of nll and its derivatives)

Arguments

parms

named vector of parameter values

model

odemodel object

data

data

solver.opts

options for the ode solver (see ode)

solver

ode solver

return.NLL

(logical) return negative log-likelihood

return.traj

(logical) return estimated trajectory