ModelStMoE-class {meteorits}R Documentation

A Reference Class which represents a fitted StMoE model.

Description

ModelStMoE represents an estimated StMoE model.

Fields

param

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

stat

A StatStMoE object. It contains all the statistics associated to the StMoE 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 input X (fields Ey and Ey_k of class StatStMoE).

  • "confregions" = Estimated mean and confidence regions. Confidence regions are computed as plus and minus twice the estimated standard deviation (the squarre root of the field Vary of class StatStMoE).

  • "clusters" = Estimated experts means (field Ey_k) and hard partition (field klas of class StatStMoE).

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

...

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

ParamStMoE, StatStMoE

Examples

data(tempanomalies)
x <- tempanomalies$Year
y <- tempanomalies$AnnualAnomaly

stmoe <- emStMoE(X = x, Y = y, K = 2, p = 1, threshold = 1e-4, verbose = TRUE)

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

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

# Log-likelihood:
stmoe$stat$loglik

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

[Package meteorits version 0.1.1 Index]