| quic.graphical_model {stabs} | R Documentation |
Stability selection fit function for sparse inverse covariance using package QUIC.
quic.graphical_model(x, y, q, ...) getLamPath(max, min, len, log = FALSE)
x |
data matrix |
y |
data matrix |
q |
number of variables |
... |
additional arguments passed to the underlying fitting function. |
max |
maximum value for regularization (lambda) |
min |
min value for lambda |
len |
length of path |
log |
log spacing |
This is a wrapper for QUIC to be used in stability selection. Pass it as
the fit function to stabsel. If you supply your own graphical model fitter, please
set the class to "graphical_model".
getLamPath can be used to create a regularization path.
A named list with elements
selected |
logical. A vector that indicates which variable was selected. |
path |
logical. A matrix that indicates which variable was selected in which step. Each row represents one variable, the columns represent the steps. |
Code contributed by Richard Beare.
stabsel for stability selection itself, and fitfun for other fitting functions.
### Do not test the following code per default on CRAN as it takes some time to run:
if (require("huge") && require("QUIC")) {
set.seed(10010)
dat.hubs <- huge.generator(n = 1000, d = 40, graph = "hub")
s.hubs <- stabsel(x = dat.hubs$data, fitfun = quic.graphical_model,
cutoff = 0.75, PFER = 10)
}