extractors: Extractors for 'cwm' class objects.

Description Usage Arguments Details Examples

Description

These functions extract values from cwm class objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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 class 'cwm'
summary(object, criterion = "BIC",  concomitant = FALSE, 
  digits = getOption("digits")-2, ...)
## S3 method for class 'cwm'
print(x, ...)

Arguments

object, x

a class cwm object.

criterion

a string with the information criterion to consider; supported values are:"AIC", "AICc", "AICu", "AIC3", "AWE", "BIC", "CAIC", "ICL". Default value is "BIC".

criteria

a vector of strings with the names of information criteria to consider. If NULL all the supported infromation criteria are considered.

k

an optional vector containing the numbers of mixture components to consider. If not specified, all the estimated models are considered.

modelXnorm

an optional vector of character strings indicating the parsimonious models to consider for Xnorm. If not specified, all the estimated models are considered.

familyY

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.

name

an optional vector of strings specifing the names of distribution families of concomitant variables; if NULL, parameters estimated for all concomitant variables are returned.

concomitant

When TRUE, concomitant variables parameters are displayed. Default is FALSE.

digits

integer used for number formatting.

...

additional arguments to be passed to getBestModel (or to whichBest for the print method).

Details

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.

Examples

1
2
3
#res <- cwm(Y=Y,Xcont=X,k=1:4,seed=1)
#summary(res)
#plot(res)

flexCWM documentation built on March 31, 2020, 5:22 p.m.