llikNorm | R Documentation |
Log likelihood for normal distribution
llikNorm(x, mean = 0, sd = 1, full = FALSE)
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 |
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()
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
Matthew L. Fidler
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.