Learn R Programming

moc (version 2.0)

plot.moc: Plotting methods for MOC models.

Description

plot.moc plots the fitted and observed values of a fitted moc model.

profilesplot is a generic method to plot subject profiles of fitted model.

profilesplot.moc plots the subject response profiles (variables or posterior) of each subject of a fitted moc object with colors that are a mix of group colors (see mix.colors.moc).

plot.residuals.moc nicely plots and object of type residuals.moc.

entropyplot is a generic method to plot subject entropy.

entropyplot.moc plots the prior and posterior subject entropy (standardized or not) corresponding to a moc model. The subject entropy are first sorted by prior then by posterior within prior.

Usage

# S3 method for moc
plot(x, against = 1:x$nvar,main = "",
     xlab = "", ylab = "", prob.legend = TRUE, scale = FALSE,
     group.colors = rainbow(x$groups), …)

# S3 method for residuals.moc plot(x, against = "Index", groups = 1:dim(x)[3], sunflower = FALSE, group.colors = NULL, …)

profilesplot(x, …) # S3 method for moc profilesplot(x, against = 1:x$nvar, main = NULL, xlab = "", ylab = "", col.legend = TRUE, scale = FALSE, group.colors = rainbow(x$groups), type = "subject", …)

entropyplot(x, …)

# S3 method for moc entropyplot(x, main = NULL, std = TRUE, lwd = 1.5, col = c("red3","green3","gray95"), shade.gr.col = gray(1-0.5*(0:(x$groups-1))/(x$groups-1)), legend = TRUE, …)

Arguments

x

Objects of class moc or residuals.moc.

against

x axis for plotting the profiles. A variable against which to plot the residuals or the strings

Index:

The default, use the index of the residuals array.

Observation:

Use the column (variable) index of the response matrix.

Subject:

Use the row (subject) index of the response matrix.

main, xlab, ylab, …

Arguments to be passed to plot, matplot.

prob.legend, col.legend, legend

Add mixture probabilities, color legend and lines to the plot.

sunflower

Specify if a sunflower or standard plot is requested.

scale

Specify if each variable should be scaled.(see scale)

groups

Specify for which groups residuals.moc plot is requested.

type

A string giving the type of profiles to plot

subject:

(default) for subject profiles.

variable:

for pairs plot of response variables.

posterior:

for pairs of posterior probabilities.

std

If TRUE standardized entropy are plotted.

lwd, col

entropyplot.moc will plot the prior and posterior entropy with lines of width \(lwd\) and colors col[1:2], the third color is used for the area between the two curves.

shade.gr.col

entropyplot.moc will mix these colors with mix.colors.moc and paint the area between the two curves accordingly.

group.colors

The groups base colors.

Value

plot.moc invisibly returns a list containing the plotted values and scaling information.

plot.residuals.moc invisibly returns the plotted residual values.

See Also

moc, residuals.moc, print.moc, AIC.moc