llikNbinomMu | R Documentation |
Calculate the log likelihood of the negative binomial function (and its derivatives)
llikNbinomMu(x, size, mu, full = FALSE)
x |
Number of successes |
size |
Size of trial |
mu |
mu parameter for negative binomial |
full |
Add the data frame showing x, mean, sd as well as the fx and derivatives |
In an rxode2()
model, you can use llikNbinomMu()
but you have to
use all arguments. You can also get the derivative of mu
with
llikNbinomMuDmu()
data frame with fx
for the pdf value of with
dProb
that has the derivatives with respect to the parameters at
the observation time-point
Matthew L. Fidler
llikNbinomMu(46:54, 100, 40)
llikNbinomMu(46:54, 100, 40, TRUE)
et <- et(46:54)
et$size <- 100
et$mu <- 40
model <- function() {
model({
fx <- llikNbinomMu(time, size, mu)
dProb <- llikNbinomMuDmu(time, size, mu)
})
}
rxSolve(model, et)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.