| llikExp {rxode2} | R Documentation |
log likelihood and derivatives for exponential distribution
Description
log likelihood and derivatives for exponential distribution
Usage
llikExp(x, rate, full = FALSE)
Arguments
x |
variable that is distributed by exponential distribution |
rate |
vector of rates. |
full |
Add the data frame showing x, mean, sd as well as the fx and derivatives |
Details
In an rxode2() model, you can use llikExp() but you have to
use the x and rate arguments. You can also get the derivative of rate with
llikExpDrate().
Value
data frame with fx for the log pdf value of with dRate
that has the derivatives with respect to the rate parameter
the observation time-point
Author(s)
Matthew L. Fidler
Examples
llikExp(1, 1:3)
llikExp(1, 1:3, full=TRUE)
# You can use rxode2 for these too:
et <- et(1:3)
et$x <- 1
model <- function() {
model({
fx <- llikExp(x, time)
dRate <- llikExpDrate(x, time)
})
}
rxSolve(model, et)
[Package rxode2 version 2.1.3 Index]