I am looking for a way to simulate genotypes of cases and control at a disease locus in R. I am supposed to set the allele frequency as control/cases. for each of the column below simulate 200 snp dataset. I am looking at treesim function from popgen to stimulate the genotypes in R. Here is what i have size case control 2000 0.6 0.15 2500 0.1 0.17 what am i missing in the treesim parameter and how do i calculate the p-value of trend test? I am a bit confused with the parameter. N<-2000 Sn<-200 theta<-0 a<-treesim(N, Sn, theta, rho.vec, mutations=FALSE, sample=FALSE) mat<-LDmat(.....) Here is the documentation. http://cran.r-project.org/web/packages/popgen/popgen.pdf any help will really be helpful. thank you, Claire -- View this message in context: http://www.nabble.com/Simulation-Case-Control-R-Beginner-tp17092885p17092885.html Sent from the R help mailing list archive at Nabble.com.