cv_intscreen: Cross validation interaction screening

Description Usage Arguments Examples

Description

This function implements CV interaction screening

Usage

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)

Arguments

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 resample.type = "cv"

fraction.in.thresh

fraction of times across the nsplits CV splits each interaction is required in the top k interactions in order to be selected

resample.type

either "cv" for cross validation or "bootstrap" for bootstrap approach

heredity

either "weak", "strong", or "none"

verbose

logical value, whether to print progress of the CV splitting

modifier

effect modifier

Examples

 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

jaredhuling/intscreen documentation built on May 19, 2019, 9:38 p.m.