oscar.binplot {oscar}R Documentation

Visualize binary indicator matrix optionally coupled with cross-validation performance for oscar models

Description

This visualization function makes use of the sparsified beta-coefficient matrix form as a function of cardinality. Optionally, user may showcase cross-validation performance alongside at the same cardinality values.

Usage

oscar.binplot(
  fit,
  cv,
  kmax,
  collines = TRUE,
  rowlines = TRUE,
  cex.axis = 0.6,
  heights = c(0.2, 0.8),
  ...
)

Arguments

fit

Fitted oscar S4-class object

cv

Matrix produced by oscar.cv; rows are cv-folds, cols are k-values

kmax

Maximum cardinality 'k'

collines

Should vertical lines be drawn to bottom part

rowlines

Should horizontal lines be drawn to highlight variables

cex.axis

Axis magnification

heights

Paneling proportions as a numeric vector of length 2

...

Additional parameters passed on to hamlet::hmap

Value

This is a plotting function that does not return anything, but instead draws on a new graphics device.

Examples

if(interactive()){
  data(ex)
  fit <- oscar(x=ex_X, y=ex_Y, k=ex_K, w=ex_c, family='cox')
  fit_cv <- oscar.cv(fit, fold = 10, seed = 123)
  oscar.binplot(fit=fit, cv=fit_cv)
}

[Package oscar version 1.2.1 Index]