ModelMHMMR-class: A Reference Class which represents a fitted MHMMR model.

Description Fields Methods See Also Examples

Description

ModelMHMMR represents an estimated MHMMR model.

Fields

param

A ParamMHMMR object. It contains the estimated values of the parameters.

stat

A StatMHMMR object. It contains all the statistics associated to the MHMMR model.

Methods

plot(what = c("predicted", "filtered", "smoothed", "regressors", "loglikelihood"), ...)

Plot method.

what

The type of graph requested:

  • "predicted" = Predicted time series and predicted regime probabilities (fields predicted and predict_prob of class StatMHMMR).

  • "filtered" = Filtered time series and filtering regime probabilities (fields filtered and filter_prob of class StatMHMMR).

  • "smoothed" = Smoothed time series, and segmentation (fields smoothed and klas of class StatMHMMR).

  • "regressors" = Polynomial regression components (fields regressors and tau_tk of class StatMHMMR).

  • "loglikelihood" = Value of the log-likelihood for each iteration (field stored_loglik of class StatMHMMR).

...

Other graphics parameters.

By default, all the above graphs are produced.

summary(digits = getOption("digits"))

Summary method.

digits

The number of significant digits to use when printing.

See Also

ParamMHMMR, StatMHMMR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(multivtoydataset)

mhmmr <- emMHMMR(multivtoydataset$x, multivtoydataset[,c("y1", "y2", "y3")],
                 K = 5, p = 1, verbose = TRUE)

# mhmmr is a ModelMHMMR object. It contains some methods such as 'summary' and 'plot'
mhmmr$summary()
mhmmr$plot()

# mhmmr has also two fields, stat and param which are reference classes as well

# Log-likelihood:
mhmmr$stat$loglik

# Parameters of the polynomial regressions:
mhmmr$param$beta

samurais documentation built on July 28, 2019, 5:02 p.m.