plot.TVsMiss: plot solution path from the fitted "TVsMiss" object

Description Usage Arguments Examples

View source: R/plot.TVsMiss.R

Description

solution path is generated, the x-axis can be either in log or normal scale, the variable names of each predictors can be chosen to show or not

Usage

1
2
## S3 method for class 'TVsMiss'
plot(x, label = FALSE, log = TRUE, ...)

Arguments

x

fitted "TVsMiss" object

label

If TRUE, the name of each predictor variable will be showed

log

If TRUE, x-axis is log scale; if FALSE, x-axis is in normal scale

...

graphical parameters to plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
n <- 50
p <- 8
beta <- c(3,0,1.5,0,2,rep(0,p-5))
xm <- matrix(rnorm(n*p),ncol = p, nrow = n)
y <- xm %*% beta + rnorm(n)
colnames(xm) <- paste0("Var_",1:p)

fit01 <- tvsmiss(x=xm,y=y)
fit01$selection_beta
fit01$beta_matrix
plot(fit01)
plot(fit01,x.log=TRUE,label = FALSE)
plot(fit01,x.log=TRUE,label = TRUE)

fit04 <- tvsmiss(x=xm,y=y,penalty = "SCAD",method = "BIC")
fit04$selection_beta
fit04$beta_matrix
plot(fit04)
plot(fit04,x.log = TRUE)
plot(fit04,x.log = TRUE,label = TRUE)

yang0117/TVsMiss documentation built on July 14, 2020, 2:56 a.m.