plot.csuv: Graphical illustration of selection uncertainty

Description Usage Arguments Value Examples

View source: R/csuv_plot.r

Description

Graphical illustration of selection uncertainty

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S3 method for class 'csuv'
plot(
  x,
  with.unconditional = FALSE,
  compare.method.fit = NULL,
  cv.mod = NULL,
  with.thr = TRUE,
  with.violin = FALSE,
  to.shade = TRUE,
  ci.method = "conditional",
  level = 0.1,
  var.freq.thr = 0.1,
  log.level = NULL,
  ...
)

Arguments

x

fitted results from CSUV::csuv()

with.unconditional

TRUE to get a unconditonal boxplot on the same graph. Default is FALSE

compare.method.fit

(optional) fitted results from CSUV::lm.compare.methods(). Alternatively, user can provide a data frame with each row contains the estimated coefficients from a method. The name of each row should be corresponding to the name of the method. The first value of each row should be the value of the intercept

cv.mod

(optional) a vector of estimated coefficients from cross validation. The first value should be the value of the intercept

with.thr

whether the selection by the CSUV should be show. Default is TRUE

with.violin

whether the graph with violin plot

to.shade

whether to shade the graph by the relative frequency calculated by CSUV. Default is TRUE

ci.method

how the confidence interval should be calculated. Default is "conditional"

level

the significant level of the whiskers. Default is 0.1

var.freq.thr

minimum variable frequency to show, default is 0.1

log.level

log level to set. Default is NULL, which means no change in log level. See the function CSUV::set.log.level for more details

...

additional argument for plot

Value

a ggplot object

Examples

1
2
3
4
5
6
X = matrix(rnorm(1000), nrow = 100)
Y = rowSums(X[,1:3])+rnorm(100)
mod.0 = csuv(X, Y, intercept = FALSE, q = 0, method.names = NULL)
cv.mod = lm.cv(X, Y, intercept = FALSE, fit.percent = 0.5, num.repeat = 50)
compare.mod = lm.compare.method(X, Y, intercept = FALSE)
plot(mod.0, compare.method.fit = compare.mod, cv.mod = cv.mod$est.b)

CSUV documentation built on Oct. 23, 2020, 5:49 p.m.

Related to plot.csuv in CSUV...