Description Usage Arguments Examples
This function implements CV interaction screening
1 2 3 4 | cv_intscreen(x, y, nints = 100, nsplits = 10, train.frac = 0.75,
fraction.in.thresh = 1, resample.type = c("bootstrap", "cv"),
heredity = c("none", "weak", "strong"), verbose = FALSE,
modifier = NULL)
|
x |
matrix of predictors |
y |
vector of observations |
nints |
integer number of top interactions to screen |
nsplits |
integer number of cross validation splits to run. defaults to 10 |
train.frac |
fraction of data used for each split. defaults to 0.75. Only
used for |
fraction.in.thresh |
fraction of times across the |
resample.type |
either |
heredity |
either |
verbose |
logical value, whether to print progress of the CV splitting |
modifier |
effect modifier |
1 2 3 4 5 6 7 8 9 10 11 12 13 | set.seed(1)
x <- matrix(rnorm(150 * 500), ncol = 500)
y <- rnorm(150) + x[,1] * x[,2] * 0.5 - x[,3] * x[,4] * 0.5
## require that each interaction be in the top 200 ints 5% of the 10 splits
ints <- cv_intscreen(x, y, nints = 200, nsplits = 10, fraction.in.thresh = 0.75)
ints$int_idx
## require that each interaction be in the top 50 ints 50% of the 10 splits
ints <- cv_intscreen(x, y, nints = 50, nsplits = 10, fraction.in.thresh = 0.5)
ints$int_idx
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.