Learn R Programming

pre (version 0.3.0)

bsnullinteract: Compute bootstrapped null interaction models

Description

bsnullinteract generates bootstrapped null interaction models, which can be used to derive a reference distribution of the test statistic calculated with interact.

Usage

bsnullinteract(object, nsamp = 10, parallel = FALSE,
  penalty.par.val = "lambda.1se", verbose = FALSE)

Arguments

object

object of class pre.

nsamp

numeric. Number of bootstrapped null interaction models to be derived.

parallel

logical. Should parallel foreach be used to generate initial ensemble? Must register parallel beforehand, such as doMC or others.

penalty.par.val

character. Which value of the penalty parameter criterion should be used? The value yielding minimum cv error ("lambda.min") or penalty parameter yielding error within 1 standard error of minimum cv error ("lambda.1se")? Alternatively, a numeric value may be specified, corresponding to one of the values of lambda in the sequence used by glmnet, for which estimated cv error can be inspected by running object$glmnet.fit and plot(object$glmnet.fit).

verbose

logical. should progress be printed to the command line?

Value

A list of length nsamp with null interaction datasets, to be used as input for interact.

Details

Computationally intensive. Progress info is printed to command line.

See Also

pre, interact

Examples

Run this code
# NOT RUN {
set.seed(42)
airq.ens <- pre(Ozone ~ ., data=airquality[complete.cases(airquality),])
nullmods <- bsnullinteract(airq.ens)
# }

Run the code above in your browser using DataLab