| llikBeta | R Documentation |
Calculate the log likelihood of the binomial function (and its derivatives)
llikBeta(x, shape1, shape2, full = FALSE)
x |
Observation |
shape1, shape2 |
non-negative parameters of the Beta distribution. |
full |
Add the data frame showing x, mean, sd as well as the fx and derivatives |
In an rxode2() model, you can use llikBeta() but you have to
use all arguments. You can also get the derivative of shape1 and shape2 with
llikBetaDshape1() and llikBetaDshape2().
data frame with fx for the log pdf value of with
dShape1 and dShape2 that has the derivatives with respect to the parameters at
the observation time-point
Matthew L. Fidler
x <- seq(1e-4, 1 - 1e-4, length.out = 21)
llikBeta(x, 0.5, 0.5)
llikBeta(x, 1, 3, TRUE)
et <- et(seq(1e-4, 1-1e-4, length.out=21))
et$shape1 <- 0.5
et$shape2 <- 1.5
model <- function() {
model({
fx <- llikBeta(time, shape1, shape2)
dShape1 <- llikBetaDshape1(time, shape1, shape2)
dShape2 <- llikBetaDshape2(time, shape1, shape2)
})
}
rxSolve(model, et)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.