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

Description Usage Arguments Details Value See Also Examples

Description

Function to visualize a gvcm.cat object.

Usage

1
2
3
4
## S3 method for class 'gvcm.cat'
plot(x, accuracy = 2, type = "path", individual = FALSE, 
xlim, ylim, main = NULL, indent = 0, color = TRUE, xscale = "lambda", 
label = TRUE, intercept = TRUE, ...)

Arguments

x

a gvcm.cat object; for type="path", a gvcm.cat object with value plot unequal NA is required

accuracy

integer; number of digits being compared when setting coefficents equal/to zero for plotting

type

one out of "path", "score", "coefs"; defines the type of the plot

individual

logical; for type="path" and type="coefs" only; for type="path", it 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 (as characters and as given in the formula, e.g.: individual.paths=c("v(1,u)", "v(x1,u1)")) for type="coefs", the default is one plot per covariate. individual allows to select single covariates.

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, lines are gray and dotted/dashed

xscale

for type="path" only; if xscale="lambda", the x-axis is scaled as 1 - λ/λ_{max}; if xscale="beta", the scale of the x-axis is the scaled L1 norm of the penalized coefficients.

label

omits addtional information printed in the plot, if FALSE

intercept

for type="coefs" and type="path" only; if FALSE, for type="path", the path of the intercept is not plotted; if FALSE, for type="coefs", intercept is not added to smooth functions

...

further arguments passed to or from other methods

Details

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. Paths are drawn by connecting steps estimates related to different values of lambda, see cat_control.
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.
Opton type="coefs" plots the penalized coefficients whenever possible.
So far, there is no plot for methods "AIC" and "BIC".

Value

A plot.

See Also

Function gvcm.cat

Examples

1
## see example for function gvcm.cat 

gvcm.cat documentation built on May 1, 2019, 10:13 p.m.