residuals.hmm: Residuals of Hidden Markov Models

Description Usage Arguments Details Value Examples

View source: R/misc_methods.R

Description

Returns residuals of the observed emissions.

Usage

1
2
## S3 method for class 'hmm'
residuals(object, ...)

Arguments

object

Object of type hmm.

...

Other arguments passed to fitted.hmm.

Details

If the distribution family is one of the included standard families (Poisson, normal, binomial or exponential), the expected value will be the plug-in estimate using the fitted parameters of each state. Otherwise, the empirical mean will be used as the expected value.

Value

Vector of residuals of the observed emissions.

Examples

1
2
3
4
5
6
7
8
## Continuation of Earthquake example

residuals(hmm.EQ)

## Continuation of simulated mixture data

hmm.mixture_X <- hmm(X.mixture, Gamma=Gamma, delta=delta, lls=lls, param_lls=param, lls_mle=lls_mle, rdist=rdist, estimate=FALSE)
residuals(hmm.mixture_X)

AdvancedR-2021/hmm documentation built on Dec. 17, 2021, 7:41 a.m.