1\name{logLik.maxLik}
2\alias{logLik.maxLik}
3\alias{logLik.summary.maxLik}
4\title{Return the log likelihood value}
5\description{
6  Return the log likelihood value of objects of class \code{maxLik}
7      and \code{summary.maxLik}.
8}
9\usage{
10\method{logLik}{maxLik}( object, \dots )
11\method{logLik}{summary.maxLik}( object, \dots )
12}
13
14\arguments{
15  \item{object}{object of class \code{maxLik} or \code{summary.maxLik},
16      usually a model estimated with Maximum Likelihood}
17  \item{...}{additional arguments to methods}
18}
19\value{
20  A scalar numeric, log likelihood of the estimated model.  It has
21  attribute \dQuote{df}, number of free parameters.
22}
23\author{
24   Arne Henningsen,
25   Ott Toomet
26}
27\seealso{\code{\link{maxLik}}}
28\examples{
29## ML estimation of exponential duration model:
30t <- rexp(100, 2)
31loglik <- function(theta) log(theta) - theta*t
32gradlik <- function(theta) 1/theta - t
33hesslik <- function(theta) -100/theta^2
34## Estimate with analytic gradient and hessian
35a <- maxLik(loglik, gradlik, hesslik, start=1)
36## print log likelihood value
37logLik( a )
38## print log likelihood value of summary object
39b <- summary( a )
40logLik( b )
41}
42\keyword{methods}
43