cwm
class objects.These functions extract values from cwm
class objects.
getBestModel(object, criterion = "BIC", k = NULL, modelXnorm = NULL, familyY = NULL)
getPosterior(object, ...)
getSize(object, ...)
getCluster(object, ...)
getParGLM(object, ...)
getParConcomitant(object, name = NULL, ...)
getPar(object, ...)
getParPrior(object, ...)
getParXnorm(object, ...)
getParXbin(object, ...)
getParXpois(object, ...)
getParXmult(object, ...)
getIC(object,criteria)
whichBest(object, criteria = NULL, k = NULL, modelXnorm = NULL, familyY = NULL)# S3 method for cwm
summary(object, criterion = "BIC", concomitant = FALSE,
digits = getOption("digits")-2, …)
# S3 method for cwm
print(x, …)
a class cwm
object.
a string with the information criterion to consider; supported values are:"AIC", "AICc", "AICu", "AIC3", "AWE", "BIC", "CAIC", "ICL".
Default value is "BIC"
.
a vector of strings with the names of information criteria to consider. If NULL
all the supported infromation criteria are considered.
an optional vector containing the numbers of mixture components to consider. If not specified, all the estimated models are considered.
an optional vector of character strings indicating the parsimonious models to consider for Xnorm
. If not specified, all the estimated models are considered.
an optional vector of character strings indicating the conditional distribution of \(Y\) in each mixture component to consider. If not specified, all the estimated models are considered.
an optional vector of strings specifing the names of distribution families of concomitant variables; if NULL
, parameters estimated for all concomitant variables are returned.
When TRUE
, concomitant variables parameters are displayed. Default is FALSE
.
integer used for number formatting.
additional arguments to be passed to getBestModel
(or to whichBest
for the print
method).
When several models have been estimated, these functions consider the best model according to the information criterion in criterion
, among the estimated models having a number of components among those in k
an error distribution among those in familyY
and a parsimonious model among those in modelXnorm
.
getIC
provides values for the information criteria in criteria
.
The getBestModel
method returns a cwm
object containing the best model only, selected as described above.
# NOT RUN {
#res <- cwm(Y=Y,Xcont=X,k=1:4,seed=1)
#summary(res)
#plot(res)
# }
Run the code above in your browser using DataLab