## Not run:
#
# require(CNVassoc)
# require(parallel)
#
# # read imputed SNP probabilities from a file-.
# # Example from SNPTEST software of 500 cases and 500 controls on 200 imputed SNPS.
# fileprobs <- system.file("exdata/SNPTEST.probs",package="CNVassocData")
#
# # build response (500 controls and 500 cases).
# resp<-rep(0:1,each=500)
#
# # generate two covariates randombly
# N<-1000
# covar1<-rnorm(N) # contiuous covariate
# covar2<-factor(sample(1:3,N,replace=TRUE),labels=c("A","B","C")) # categorical covariate
#
# # run with 6 cores. Under Windows OS, multicore must be <=1.
# system.time(
# res<-fastCNVassoc(fileprobs,resp~covar1+covar2,family="binomial",multicore=6)
# )
# res
#
# # build a time-to-event response randomly
# set.seed(123456)
# times <- rexp(N,1)
# cens <- rbinom(N,1,0.8)
#
# system.time(
# res<-fastCNVassoc(fileprobs,Surv(times,cens)~covar1+covar2,family="weibull",multicore=6)
# )
# res
#
#
# ## End(Not run)
Run the code above in your browser using DataLab