llikPois function

log-likelihood for the Poisson distribution

log-likelihood for the Poisson distribution

llikPois(x, lambda, full = FALSE)

Arguments

  • x: non negative integers
  • lambda: non-negative means
  • full: Add the data frame showing x, mean, sd as well as the fx and derivatives

Returns

data frame with fx for the pdf value of with dLambda that has the derivatives with respect to the parameters at the observation time-point

Details

In an rxode2() model, you can use llikPois() but you have to use all arguments. You can also get the derivatives with llikPoisDlambda()

Examples

llikPois(0:7, lambda = 1) llikPois(0:7, lambda = 4, full=TRUE) # In rxode2 you can use: et <- et(0:10) et$lambda <- 0.5 model <- function() { model({ fx <- llikPois(time, lambda) dLambda <- llikPoisDlambda(time, lambda) }) } rxSolve(model, et)

Author(s)

Matthew L. Fidler