logLik.hmm: Log-likelihood of the Hidden Markov Model

View source: R/logLik.hmm.R

logLik.hmmR Documentation

Log-likelihood of the Hidden Markov Model

Description

Function logLik.hmm computes the log-likelihood value of a hidden Markov model.

Usage

## S3 method for class 'hmm'
logLik(object, partials = FALSE, threads = 1, log_space = FALSE, ...)

Arguments

object

A hidden Markov model of class hmm.

partials

Return a vector containing the individual contributions of each sequence to the total log-likelihood. The default is FALSE, which returns the sum of all log-likelihood components.

threads

Number of threads to use in parallel computing. The default is 1.

log_space

Make computations using log-space instead of scaling for greater numerical stability at the cost of decreased computational performance. The default is TRUE.

...

Ignored.

Value

Log-likelihood of the hidden Markov model. This is an object of class logLik with attributes nobs and df inherited from the model object.

See Also

build_hmm and fit_model for building and fitting Hidden Markov models.


helske/seqHMM documentation built on July 6, 2023, 6:45 a.m.