Learn R Programming

gvcm.cat (version 1.3)

plot.gvcm.cat: Plot Method for gvcm.cat Objects

Description

gvcm.cat() offers two ways of visualizing a gvcm.cat object with penalized estimation. Default option type="path" delivers a graphic with the coefficient paths between 0 (= maximal penalization) and 1 (= no penalization). Maximal penalization is defined by the minimal penalty parameter lambda that sets all penalized coefficients to zero (to constant relating to the intercept and assured.intercept = TRUE). Minimal penalization means no penalization at all, i.e. lambda = 0. Of course the minimal penalty parameter causing maximal penalization depends on how selection and clustering of coefficients is defined (see function gvcm.cat and cat_control). Coefficients belonging to one covariate are plotted in the same color, coefficients that are not modified are plotted as dashed lines. Option type="score" plots the cross-validation score (depending on criterion in cat_control) as a function of penalty parameter lambda and marks the chosen penalty parameter as a dotted line.

Usage

## S3 method for class 'gvcm.cat':
plot(x, accuracy = 2, type = "path", individual.paths = FALSE, 
xlim, ylim, main = NULL, indent = 0, color = TRUE, ...)

Arguments

x
gvcm.cat object with value plot unequal NA
accuracy
integer; number of digits being compared when setting coefficents equal/to zero for plotting
type
one out of "path", "score"; defines the type of plot
individual.paths
logical; indicates whether the paths of all coefficients shall be plotted into one common figure (default) or in an individual figure per covariate; paths of single covariates can be selected by giving a vector containing the covariates' names as characte
xlim
the x limits (x1, x2) of the plot
ylim
the y limits (y1, y2) of the plot
main
title of the plot
indent
numeric; if larger zero, coefficient names printed on top of each other are adjusted
color
logical; if FALSE, paths are gray and dotted/dashed
...
further arguments passed to or from other methods

Value

  • A plot.

Details

Paths are drawn by connecting steps estimates related to different values of lambda and constant phi, see cat_control. There is no plot for methods "AIC" and "BIC".

See Also

Function gvcm.cat

Examples

Run this code
## continues example of function gvcm.cat 
plot(m1)

Run the code above in your browser using DataLab