log likelihood and derivatives for chi-squared distribution
llikChisq(x, df, full = FALSE)
x
: variable that is distributed by chi-squared distributiondf
: degrees of freedom (non-negative, but can be non-integer).full
: Add the data frame showing x, mean, sd as well as the fx and derivativesdata frame with fx
for the log pdf value of with dDf
that has the derivatives with respect to the df
parameter the observation time-point
In an rxode2()
model, you can use llikChisq()
but you have to use the x and df arguments. You can also get the derivative of df
with llikChisqDdf()
.
llikChisq(1, df = 1:3, full=TRUE) llikChisq(1, df = 6:9) et <- et(1:3) et$x <- 1 model <- function() { model({ fx <- llikChisq(x, time) dDf <- llikChisqDdf(x, time) }) } rxSolve(model, et)
Matthew L. Fidler
Useful links