make.inter | R Documentation |
This function is to construct a design matrix of interactions from two main-effect design matrices.
make.inter(x1, x2, back = 0)
x1 , x2 |
design matrices of main-effect predictors. |
back |
For GxE interactions, |
This function returns a data.frame consisting of values of all interaction predictors.
Nengjun Yi, nyi@uab.edu
make.main
library(BhGLM)
x = sim.x(n=100, m=10, genotype=6:10)
geno = x[, 6:10] #get genotype data
cov1 = x[, 1, drop=F] #get the first covariate
x.main = make.main(geno=geno, model="Cockerham", fill.missing=T)
x.GE = make.inter(x.main, cov1, back=0) #interactions between cov1 and all main effects
x.GG1 = make.inter(x.main[, 1:4], x.main[, 5:10], back=1) # some GxG interactions
x.GG2 = make.inter(x.main, x.main, back=1) # all GxG interactions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.