| ModelMHMMR-class {samurais} | R Documentation |
A Reference Class which represents a fitted MHMMR model.
Description
ModelMHMMR represents an estimated MHMMR model.
Fields
paramA ParamMHMMR object. It contains the estimated values of the parameters.
statA StatMHMMR object. It contains all the statistics associated to the MHMMR model.
Methods
plot(what = c("predicted", "filtered", "smoothed", "regressors", "loglikelihood"), ...)Plot method.
whatThe type of graph requested:
-
"predicted" =Predicted time series and predicted regime probabilities (fieldspredictedandpredict_probof class StatMHMMR). -
"filtered" =Filtered time series and filtering regime probabilities (fieldsfilteredandfilter_probof class StatMHMMR). -
"smoothed" =Smoothed time series, and segmentation (fieldssmoothedandklasof class StatMHMMR). -
"regressors" =Polynomial regression components (fieldsregressorsandtau_tkof class StatMHMMR). -
"loglikelihood" =Value of the log-likelihood for each iteration (fieldstored_loglikof class StatMHMMR).
-
...Other graphics parameters.
By default, all the above graphs are produced.
summary(digits = getOption("digits"))Summary method.
digitsThe number of significant digits to use when printing.
See Also
Examples
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