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

View source: R/fitode.R

logLik.sensitivityR Documentation

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
)

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

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)


parksw3/fitode documentation built on April 3, 2024, 7:45 a.m.