llh: Title

Description Usage Arguments Value

View source: R/llh.R

Description

Title

Usage

1
llh(Xs, mod, control = list())

Arguments

Xs

List of nsequences matrices; each matrix represents one observation sequence and is of dimension nobs x nfeatures. For a single observation sequence, a single matrix can be provided

mod

Model object of class 'feelr.hmm', as output by hmm

control

List of control parameters

Value

List with two components. llhs is a numeric vector of log-likelihoods of each observation sequence in Xs. llh_total is the log-likelihood of all observation sequences together, i.e. sum(llhs). If Xs is the same data that generated mod, the values calculated here will be slightly lower than those output in mod$llhs. This is because hmm estimates the starting state of each sequence, whereas here it is assumed that the starting state is drawn from the stationary distribution mod$delta.


communication documentation built on Feb. 25, 2021, 5:08 p.m.