Learn R Programming

CIpostSelect (version 0.2.1)

plot.CIps: Plot method for the CIps class

Description

It provides a ggplot graphic where the x-axis displays all the explanatory variables, with the confidence intervals of the selected variables shown in green and the coefficient estimates represented as red points.

Usage

# S3 method for CIps
plot(x, ...)

Value

No return value, called for its side effects, which is plotting a graph.

Arguments

x

An object of class CIps.

...

Additional arguments to be passed to the plot function.

Examples

Run this code

library(mlbench)
data("BostonHousing")
# lmps object
model = lmps(medv~., data = BostonHousing, method = "Lasso", N = 50)
# CIps object
cips = CIps(model, vote = "coef", alpha = 0.05, s.vote_coef = 0.5)
# plot
plot(cips)

# \donttest{
# lmps object
model = lmps(medv~., data = BostonHousing, method = "Lasso", N = 50, cores = 2)
# CIps object
cips = CIps(model, vote = "coef", alpha = 0.05, s.vote_coef = 0.5)
# plot
plot(cips)
# }

Run the code above in your browser using DataLab