GE_BICS: GE_BICS.R

View source: R/GE_BICS.R

GE_BICSR Documentation

GE_BICS.R

Description

A function to perform inference on the GxE interaction regression coefficient. Shows better small sample performance than comparable methods.

Usage

GE_BICS(outcome, design_mat, num_boots = 1000, desired_coef,
  outcome_type, check_singular = FALSE)

Arguments

outcome

The outcome vector

design_mat

The design matrix of covariates

num_boots

The number of bootstrap resamples to perform - we suggest 1000

desired_coef

The column in the design matrix holding the interaction covariate

outcome_type

Either 'D' for dichotomous outcome or 'C' for continuous outcome

check_singular

Make sure the design matrix can be inverted for variance estimation

Value

The p-value for the interaction effect

Examples

E <- rnorm(n=500)
G <- rbinom(n=500, size=2, prob=0.3)
design_mat <- cbind(1, G, E, G*E)
outcome <- rnorm(500)
GE_BICS(outcome=outcome, design_mat=design_mat, desired_coef=4, outcome_type='C')

ryanrsun/GEint documentation built on May 20, 2022, 3:07 a.m.