llikBinom function

Calculate the log likelihood of the binomial function (and its derivatives)

Calculate the log likelihood of the binomial function (and its derivatives)

llikBinom(x, size, prob, full = FALSE)

Arguments

  • x: Number of successes
  • size: Size of trial
  • prob: probability of success
  • full: Add the data frame showing x, mean, sd as well as the fx and derivatives

Returns

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

Details

In an rxode2() model, you can use llikBinom() but you have to use all arguments. You can also get the derivative of prob with llikBinomDprob()

Examples

llikBinom(46:54, 100, 0.5) llikBinom(46:54, 100, 0.5, TRUE) # In rxode2 you can use: et <- et(46:54) et$size <- 100 et$prob <-0.5 model <- function() { model({ fx <- llikBinom(time, size, prob) dProb <- llikBinomDprob(time, size, prob) }) } rxSolve(model, et)

Author(s)

Matthew L. Fidler