llikNorm function

Log likelihood for normal distribution

Log likelihood for normal distribution

llikNorm(x, mean = 0, sd = 1, full = FALSE)

Arguments

  • x: Observation
  • mean: Mean for the likelihood
  • sd: Standard deviation for the likelihood
  • 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 dMean and dSd that has the derivatives with respect to the parameters at the observation time-point

Details

In an rxode2() model, you can use llikNorm() but you have to use all arguments. You can also get the derivatives with llikNormDmean() and llikNormDsd()

Examples

llikNorm(0) llikNorm(seq(-2,2,length.out=10), full=TRUE) # With rxode2 you can use: et <- et(-3, 3, length.out=10) et$mu <- 0 et$sigma <- 1 model <- function(){ model({ fx <- llikNorm(time, mu, sigma) dMean <- llikNormDmean(time, mu, sigma) dSd <- llikNormDsd(time, mu, sigma) }) } ret <- rxSolve(model, et) ret

Author(s)

Matthew L. Fidler