Graphical output of SIR_threshold_bootstrap
plot.SIR_threshold_bootstrap.Rd
Display the estimated index versus Y of the SIR model, the size of the models, the occurrence of variable selection, the distribution of the coefficients of and \(\hat{b}\) and the distribution of \(\lambda_{opt}\) found across the replications.
Usage
# S3 method for class 'SIR_threshold_bootstrap'
plot(x, choice = "", ...)
Arguments
- x
A SIR_threshold_bootstrap object
- choice
the graph to plot:
"estim_ind" Plot the estimated index by the SIR model versus Y.
"size" Plot the size of the models across the replications.
"selec_var" Plot the occurrence of the selected variables across the replications.
"coefs_b" Plot the value of \(\hat{b}\) across the replications.
"lambdas_replic" Plot the distribution of \(\lambda_{opt}\) across the replications.
"" Plot every graphs (default).
- ...
arguments to be passed to methods, such as graphical parameters (not used here).
Examples
# 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
# \donttest{
res = SIR_threshold_bootstrap(Y,X,H=10,n_lambda=300,thresholding="hard", n_replications=30,k=2)
#> [1] "Replication 5 / 30"
#> [1] "Replication 10 / 30"
#> [1] "Replication 15 / 30"
#> [1] "Replication 20 / 30"
#> [1] "Replication 25 / 30"
#> [1] "Replication 30 / 30"
# Estimated index versus Y
plot(res,choice="estim_ind")
# Model size
plot(res,choice="size")
# Selected variables
plot(res,choice="selec_var")
# Coefficients of b
plot(res,choice="coefs_b")
# Optimal lambdas
plot(res,choice="lambdas_replic")
# }