logLik.ZIPLNfit: Extract log-likelihood of a fitted ZIPLN model

View source: R/ZIPLNfit-S3methods.R

logLik.ZIPLNfitR Documentation

Extract log-likelihood of a fitted ZIPLN model

Description

Returns the variational lower bound of the log-likelihood as a "logLik" object, compatible with stats::AIC() and stats::BIC().

Usage

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

Arguments

object

an R6 object with class ZIPLNfit

...

additional parameters for S3 compatibility. Not used

Value

An object of class "logLik". The numeric value is the variational ELBO. Attributes df and nobs hold the number of parameters and observations.

Examples

data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
model <- ZIPLN(Abundance ~ 1, data = trichoptera)
logLik(model)

PLNmodels documentation built on July 27, 2026, 5:09 p.m.