haplo.scan(y, geno, width=4, miss.val=c(0, NA),
em.control=haplo.em.control(),
sim.control=score.sim.control())haplo.scan.obs(y, em.obj, width)
haplo.scan.sim(y.reord, save.lst, nloci)
haplo.em
,
haplo.em.control
,
score.sim.control
# create a random genotype matrix with 10 loci, 50 cases, 50 controls
set.seed(1)
tmp <- ifelse(runif(2000)>.3, 1, 2)
geno <- matrix(tmp, ncol=20)
y <- rep(c(0,1),c(50,50))
# search 10-locus region, typically don't limit the number of
# simulations, but run time can get long with many simulations
scan.obj <- haplo.scan(y, geno, width=3,
sim.control = score.sim.control(min.sim=10, max.sim=20))
print(scan.obj)
Run the code above in your browser using DataLab