# The simulated data set described in Details.
sim1 <- simulateSNPcatResponse()
sim1
# Specifying the values of the response by the levels with
# the largest probability.
sim2 <- simulateSNPcatResponse(sample.y = FALSE)
sim2
# If ((SNP4 != 2) & (SNP3 == 1)), (SNP5 ==3), and
# ((SNP12 !=1) & (SNP9 == 3)) should be the three interactions
# (or variables) that are explanatory for the three levels
# of the response, list.ia and list.snp are specified as follows.
list.ia <- list(c(-2, 1), 3, c(-1,3))
list.snp <- list(c(4, 3), 5, c(12,9))
# The categorical response and a data set consisting of
# 800 observations and 25 SNPs, where the minor allele
# frequency of each SNP is randomly drawn from a
# uniform distribution with minimum 0.1 and maximum 0.4,
# is then generated by
sim3 <- simulateSNPcatResponse(n.obs = 800, n.snp = 25,
list.ia = list.ia, list.snp = list.snp, maf = c(0.1, 0.4))
sim3Run the code above in your browser using DataLab