loglik: Compute the log-likelihood of a model given some data

loglikR Documentation

Compute the log-likelihood of a model given some data

Description

Given a statistical model and some data, this function computes the log-likelihood of the model given the data, i.e., the log-probability of the data under the model.

Usage

loglik(model, x, ...)

## S4 method for signature 'ZinbModel,matrix'
loglik(model, x)

Arguments

model

an object that describes a statistical model.

x

an object that describes data.

...

additional arguments.

Value

The log-likelihood of the model given the data.

Methods (by class)

  • loglik(model = ZinbModel, x = matrix): return the log-likelihood of the ZINB model.

Examples

m <- zinbModel(n=5, J=10)
x <- zinbSim(m)
loglik(m, x$counts)

drisso/zinbwave documentation built on March 18, 2024, 5:13 p.m.