powered by
A function to perform inference on the GxE interaction regression coefficient. Shows better small sample performance than comparable methods.
GE_BICS(outcome, design_mat, num_boots = 1000, desired_coef, outcome_type, check_singular = FALSE)
The p-value for the interaction effect
The outcome vector
The design matrix of covariates
The number of bootstrap resamples to perform - we suggest 1000
The column in the design matrix holding the interaction covariate
Either 'D' for dichotomous outcome or 'C' for continuous outcome
Make sure the design matrix can be inverted for variance estimation
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')
Run the code above in your browser using DataLab