| llikGamma {rxode2} | R Documentation |
log likelihood and derivatives for Gamma distribution
Description
log likelihood and derivatives for Gamma distribution
Usage
llikGamma(x, shape, rate, full = FALSE)
Arguments
x |
variable that is distributed by gamma distribution |
shape |
this is the distribution's shape parameter. Must be positive. |
rate |
this is the distribution's rate parameters. Must be positive. |
full |
Add the data frame showing x, mean, sd as well as the fx and derivatives |
Details
In an rxode2() model, you can use llikGamma() but you have to
use the x and rate arguments. You can also get the derivative of shape or rate with
llikGammaDshape() and llikGammaDrate().
Value
data frame with fx for the log pdf value of with dProb
that has the derivatives with respect to the prob parameters at
the observation time-point
Author(s)
Matthew L. Fidler
Examples
llikGamma(1, 1, 10)
# You can use this in `rxode2` too:
et <- et(seq(0.001, 1, length.out=10))
et$shape <- 1
et$rate <- 10
model <- function() {
model({
fx <- llikGamma(time, shape, rate)
dShape<- llikGammaDshape(time, shape, rate)
dRate <- llikGammaDrate(time, shape, rate)
})
}
rxSolve(model, et)
[Package rxode2 version 2.1.3 Index]