Learn R Programming

smmR (version 1.0.3)

loglik: Log-likelihood Function

Description

Generic function computing the log-likelihood of the model x, with the list of sequences sequences.

Usage

loglik(x, sequences = NULL)

Arguments

x

An object for which there exists a loglik attribute if sequences = NULL. Otherwise, the log-likelihood will be computed using the model x and the sequences sequences.

sequences

Optional. A list of vectors representing the sequences for which the log-likelihood will be computed based on x.

Value

Value of the log-likelihood.