loglikValue {micEcon}R Documentation

Return the log likelihood value

Description

Return the log likelihood value. Objects should be models, estimated by Maksimum Likelihood, or other statistical models where the likelihood makes sense.

Usage

loglikValue(x, ...)

Arguments

x object, usually a model estimated with Maximum Likelihood
... additional arguments to methods

Details

The default method returns the component loglik

Value

A single numeric, log likelihood of the estimated model

Author(s)

Ott Toomet otoomet@ut.ee

See Also

maxLik

Examples

## We estimate a tobit-2 model and print the loglik value
library(mvtnorm)
N <- 500
   vc <- diag(2)
   vc[2,1] <- vc[1,2] <- -0.7
   eps <- rmvnorm(N, rep(0, 2), vc)
   xs <- runif(N)
   ys <- xs + eps[,1] > 0
   xo <- runif(N)
   yo <- (xo + eps[,2])*(ys > 0)
   a <- selection(ys~xs, yo ~xo)
loglikValue(a) # this values is also printed by 'summary'

[Package micEcon version 0.3-8 Index]