Description Usage Arguments Value Author(s) See Also Examples
View source: R/logLik.maxLik.R
Return the log likelihood value of objects of class maxLik
and summary.maxLik
.
1 2 3 4 |
object |
object of class |
... |
additional arguments to methods |
A scalar numeric, log likelihood of the estimated model
Arne Henningsen, Ott Toomet
1 2 3 4 5 6 7 8 9 10 11 12 | ## ML estimation of exponential duration model:
t <- rexp(100, 2)
loglik <- function(theta) log(theta) - theta*t
gradlik <- function(theta) 1/theta - t
hesslik <- function(theta) -100/theta^2
## Estimate with analytic gradient and hessian
a <- maxLik(loglik, gradlik, hesslik, start=1)
## print log likelihood value
logLik( a )
## print log likelihood value of summary object
b <- summary( a )
logLik( b )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.