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

Description Usage Arguments Value Methods (by class) Examples

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

1
2
3
4
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)

Examples

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

zinbwave documentation built on Nov. 8, 2020, 8:11 p.m.