logLik {dbd}R Documentation

Retrieve the (maximised) log likelihood from an "mleDb" or an "mleBb" object.

Description

Extract the log likelihood attribute an object of class "mleDb" or "mleBb". I.e. obtain the maximum log likelihood in respect of the estimation of the parameters of a db or beta-binomial distribution.

Usage

   ## S3 method for class 'mleDb'
logLik(object, ...)
   ## S3 method for class 'mleBb'
logLik(object, ...)

Arguments

object

An object of class "mleDb" as returned by mleDb() or of class "mleBb" as returned by mleBb().

...

Not used.

Value

An object of class "logLik", which consists of a numeric scalar equal to the maximum log likelihood for the parameters of a db or beta-binomial distribution. It has an attribute "df" equal to 2.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

mleDb() mleBb()

Examples

X <- hmm.discnp::SydColDisc
X$y <- as.numeric(X$y)
X <- split(X,f=with(X,interaction(locn,depth)))
fitz <- lapply(X,function(x){mleDb(x$y,ntop=5)})
sapply(fitz,logLik)
X     <- hrsRcePred
top1e <- X[X$sbjType=="Expert","top1"]
fit   <- mleBb(top1e,10)
logLik(fit)

[Package dbd version 0.0-22 Index]