oscar.binplot | R Documentation |
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.
oscar.binplot(
fit,
cv,
kmax,
collines = TRUE,
rowlines = TRUE,
cex.axis = 0.6,
heights = c(0.2, 0.8),
...
)
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 |
This is a plotting function that does not return anything, but instead draws on a new graphics device.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.