Learn R Programming

dbd (version 0.0-22)

logLik: 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 mleDb
logLik(object, ...)
   # S3 method for 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.

See Also

mleDb() mleBb()

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab