intnet: Cross validation interaction screening

Description Usage Arguments Examples

Description

This function implements CV interaction screening

Usage

1
2
3
4
5
intnet(x, y, which.cols = 1:ncol(x), nints = 100,
  heredity = c("none", "weak", "strong"),
  resample.type = c("bootstrap", "cv"), nsplits = 10,
  train.frac = 0.75, fraction.in.thresh = 1, verbose = FALSE,
  modifier = NULL, ...)

Arguments

x

matrix of predictors

y

vector of observations

which.cols

integer vector indicating which columns of x to check for interactions

nints

integer number of top interactions to screen

heredity

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

resample.type

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

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 nints interactions in order to be selected

modifier

effect modifier

...

arguments to be passed to glmnet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(intnet)

set.seed(1)
x <- matrix(rnorm(100 * 350), ncol = 350)
y <- rnorm(100) + x[,1] * x[,2] * 0.5 - x[,3] * x[,4] * 0.5


## require that each interaction be in the top 50 ints 100% of the 15 splits
intmod <- intnet(x, y, nints = 50, nsplits = 15, fraction.in.thresh = 1)

plot(intmod)

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