plot3D.splmm: 3D Plot the tuning results of a "splmm.tuning" object when...

Description Usage Arguments Value See Also Examples

View source: R/methods.R

Description

This function inputs an 'splmm.tuning' object and plot the model selection criterion values in a 3D plot over the lambda 1 and lambda 2 tuning parameters grid.

Usage

1
2
## S3 method for class 'splmm'
plot3D(x, criteria=c("BIC","AIC","BICC","EBIC"),type=c("line","surface"),...)

Arguments

x

a 'splmm.tuning' object with both lam1.tuning=TRUE and lam2.tuning=TRUE

criteria

A parameter specifying whether the criteria value the user want to plot is BIC, AIC, BICC or EBIC. The default is BIC

type

A parameter specifying which type of 3D plot to use for plotting. Currently the available options include line plot and surface plot. The default is surface plot.

...

not used

Value

A 3D line/surface plot of BIC/AIC/BICC/EBIC values against lam1 and lam2.

See Also

plot3D

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(cognitive)

x <- model.matrix(ravens ~schoolid+treatment+year+sex+age_at_time0
                  +height+weight+head_circ+ses+mom_read+mom_write
                  +mom_edu, cognitive)
z <- x

## Tuning over lambda1 grid and lambda2 grid
lam1 = seq(0.1,0.5,0.1)
lam2 = seq(0.1,0.5,0.1)
fit1 <-splmmTuning(x=x,y=cognitive$ravens,z=z,grp=cognitive$id,lam1=lam1,
lam2=lam2,penalty.b="scad", penalty.L="scad")
plot3D.splmm(fit1)

splmm documentation built on Sept. 8, 2021, 5:08 p.m.