ggInteract_boot: ggInteract_boot

Description Usage Arguments Value

View source: R/ggInteract_boot.R

Description

Function to randomize the response n times to generate a distribution under the null hypothesis of no interaction among predictors for one or several pairs of predictors (following Pinsky and Byler 2015). Model parameters should be the same as for the observed interaction strength. Results allow to compare with observed interaction strength.

Usage

1
2
3
ggInteract_boot(..., nboots = 100, data = NULL, response = NULL,
  predictors = NULL, tc = 3, lr = 0.005, bf = 0.75,
  family = "bernoulli", global.env = T)

Arguments

...

one or several pair of interacting predictors as vectors (e.g. c(pred1, pred2), c(pred3,pred4))

nboots

the number of randomization (default=100)

data

the dataset for the boosted regression trees (BRT) (default=NULL)

response

the response variable of the BRT (default=NULL)

predictors

the set of predictors for the BRT (default=NULL)

tc

tree complexity for the BRT (default=3)

lr

learning rate for the BRT (default=0.005)

bf

bag fraction for the BRT (default=0.75)

family

the distribution family for the BRT (default=“bernoulli”)

global.env

Logical. If TRUE (default) export the result into the R global environment as an object called Interact_boots

Value

Returns a dataframe of interaction sizes with as many columns as there are pairs of predictors (+1) and as many rows as the number of randomizations.


JBjouffray/ggBRT documentation built on Jan. 30, 2021, 8:13 a.m.