llikPois {rxode2} | R Documentation |
log-likelihood for the Poisson distribution
Description
log-likelihood for the Poisson distribution
Usage
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 |
Details
In an rxode2()
model, you can use llikPois()
but you have to
use all arguments. You can also get the derivatives with
llikPoisDlambda()
Value
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
Author(s)
Matthew L. Fidler
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)
[Package rxode2 version 2.1.3 Index]