Last data update: 2014.03.03

R: Plot for CWMs
plot.cwmR Documentation

Plot for CWMs

Description

Plot method for cwm class objects.

Usage

 ## S3 method for class 'cwm'
plot(x, regr = TRUE, ctype = c("Xnorm","Xbin","Xpois",
                 "Xmult"), which = NULL, criterion = "BIC", k = NULL,
                 modelXnorm = NULL, familyY = NULL, ...)

Arguments

x

An object of class cwm.

regr

boolean, allows for bivariate regression plot.

ctype

a vector with concomitant variables types to plot.

which

a vector with columns number to plot, or "all" for all the columns

criterion

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

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.

...

further arguments for plot.

Examples

data("students")
attach(students)
str(students)
fit2 <- cwm(WEIGHT ~ HEIGHT + HEIGHT.F , Xnorm = cbind(HEIGHT, HEIGHT.F), k = 2, 
  initialization = "kmeans", modelXnorm = "EEE")
summary(fit2, concomitant = TRUE)
plot(fit2)

Results