# NOT RUN {
set.seed(100);
# Design matrix
X = cbind(1,rnorm(1e3));
# Genotypes
G = replicate(1e3,rbinom(n=1e3,size=2,prob=0.25));
storage.mode(G) = "numeric";
# Phenotype
y = exp(as.numeric(X%*%c(1,1))+rnorm(1e3));
# Average correlation
p = OINT(y=y,G=G,X=X,method="AvgCorr");
# Bootstrap correlation
p = OINT(y=y,G=G[,1:10],X=X,method="Bootstrap",B=100);
# Manual correlation
p = OINT(y=y,G=G,X=X,method="Manual",set.rho=0.5);
# }
Run the code above in your browser using DataLab