| ModelHMMR-class {samurais} | R Documentation |
A Reference Class which represents a fitted HMMR model.
Description
ModelHMMR represents an estimated HMMR model.
Fields
paramAn object of class ParamHMMR. It contains the estimated values of the parameters.
statAn object of class StatHMMR. It contains all the statistics associated to the HMMR 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 StatHMMR). -
"filtered" =Filtered time series and filtering regime probabilities (fieldsfilteredandfilter_probof class StatHMMR). -
"smoothed" =Smoothed time series, and segmentation (fieldssmoothedandklasof the class StatHMMR). -
"regressors" =Polynomial regression components (fieldsregressorsandtau_tkof class StatHMMR). -
"loglikelihood" =Value of the log-likelihood for each iteration (fieldstored_loglikof class StatHMMR).
-
...Other graphics parameters.
By default, all the graphs mentioned above are produced.
summary(digits = getOption("digits"))Summary method.
digitsThe number of significant digits to use when printing.
See Also
Examples
data(univtoydataset)
hmmr <- emHMMR(univtoydataset$x, univtoydataset$y, K = 5, p = 1, verbose = TRUE)
# hmmr is a ModelHMMR object. It contains some methods such as 'summary' and 'plot'
hmmr$summary()
hmmr$plot()
# hmmr has also two fields, stat and param which are reference classes as well
# Log-likelihood:
hmmr$stat$loglik
# Parameters of the polynomial regressions:
hmmr$param$beta