forwardbackward: Forward and backward variables

Description Usage Arguments Value Author(s) References Examples

Description

Compute the forward and backward variables of a depmix object.

Usage

1
2
	## S4 method for signature 'mix'
forwardbackward(object, return.all=TRUE, useC=TRUE, ...)

Arguments

object

A depmix object.

return.all

If FALSE, only gamma and xi and the log likelihood are returned (which are the only variables needed in using EM).

useC

Flag used to set whether the C-code is used to compute the forward, backward, gamma and xi variables or not; the R-code is basically obsolete (but retained for now for debugging purposes).

...

Not currently used.

Value

forwardbackward returns a list of the following (the variables are named after the notation from Rabiner, 1989):

alpha

The forward variables.

beta

The backward variables.

gamma

The smoothed transition probabilities.

xi

The smoothed state probabilities.

sca

The scale factors (called lambda in Rabiner, 1989).

logLike

The log likelihood (computed as sum(log(sca)).

If return.all=FALSE, only gamma, xi and the log likelihood are returned.

Author(s)

Maarten Speekenbrink & Ingmar Visser

References

Lawrence R. Rabiner (1989). A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of IEEE, 77-2, p. 267-295.

Examples

1
	# add some later

koooee/depmixS4 documentation built on May 20, 2019, 1:07 p.m.