ModelTMoE-class {meteorits} | R Documentation |
A Reference Class which represents a fitted TMoE model.
Description
ModelTMoE represents an estimated TMoE model.
Fields
param
A ParamTMoE object. It contains the estimated values of the parameters.
stat
A StatTMoE object. It contains all the statistics associated to the TMoE model.
Methods
plot(what = c("meancurve", "confregions", "clusters", "loglikelihood"), ...)
Plot method.
what
The type of graph requested:
-
"meancurve" =
Estimated mean and estimated experts means given the inputX
(fieldsEy
andEy_k
of class StatTMoE). -
"confregions" =
Estimated mean and confidence regions. Confidence regions are computed as plus and minus twice the estimated standard deviation (the squarre root of the fieldVary
of class StatTMoE). -
"clusters" =
Estimated experts means (fieldEy_k
) and hard partition (fieldklas
of class StatTMoE). -
"loglikelihood" =
Value of the log-likelihood for each iteration (fieldstored_loglik
of class StatTMoE).
-
...
Other graphics parameters.
By default, all the graphs mentioned above are produced.
summary(digits = getOption("digits"))
Summary method.
digits
The number of significant digits to use when printing.
See Also
Examples
data(tempanomalies)
x <- tempanomalies$Year
y <- tempanomalies$AnnualAnomaly
tmoe <- emTMoE(X = x, Y = y, K = 2, p = 1, verbose = TRUE)
# tmoe is a ModelTMoE object. It contains some methods such as 'summary' and 'plot'
tmoe$summary()
tmoe$plot()
# tmoe has also two fields, stat and param which are reference classes as well
# Log-likelihood:
tmoe$stat$loglik
# Parameters of the polynomial regressions:
tmoe$param$beta