View source: R/plot.SIR_threshold_opt.R
plot.SIR_threshold_opt | R Documentation |
Display the 10 first eigen values,the estimated index versus Y of the SIR model,
the evolution of cos^2
and variable selection according to \lambda
, and the
regularization path of \hat{b}
.
## S3 method for class 'SIR_threshold_opt'
plot(x, choice = "", ...)
x |
A SIR_threshold_opt object |
choice |
the graph to plot:
|
... |
arguments to be passed to methods, such as graphical parameters (not used here). |
No return value
# Generate Data
set.seed(10)
n <- 200
beta <- c(1,1,rep(0,8))
X <- mvtnorm::rmvnorm(n,sigma=diag(1,10))
eps <- rnorm(n)
Y <- (X%*%beta)**3+eps
# Apply SIR with soft thresholding
res = SIR_threshold_opt(Y,X,H=10,n_lambda=100,thresholding="soft")
# Estimated index versus Y
plot(res,choice="estim_ind")
# Choice of optimal lambda
plot(res,choice="opt_lambda")
# Evolution of cos^2 and var selection according to lambda
plot(res,choice="cos2_selec")
# Regularization path
plot(res,choice="regul_path")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.