if (FALSE) {
## Simulate Haplin results from 100 files using the multiplicative model in haplin.
## The files consist of fetal effects at two diallelic markers,
## corresponding to haplo.freq = rep(0.25, 4), RR = c(2,1,1,1)
## and RRstar = c(1,1,1,1). That is, the first allele has a doubled risk
## relative to the rest. The data consists of a combination of
## 100 case triads and 100 control triads with no missing data.
## No environmental factors are considered, i.e. the number of strata is one.
hapRun(nall = c(2,2), n.strata = 1, cases = c(mfc=100), controls = c(mfc=100),
haplo.freq = rep(0.25,4), RR = c(2,1,1,1), RRstar = c(1,1,1,1),
hapfunc = "haplin", response = "mult", n.sim = 100, dire = "simfiles", ask = FALSE)
## Simulate power from 100 files applying haplinStrat.
## The files consist of fetal and maternal effects at two diallelic markers.
## The data is simulated for 500 case triads and 200 control families in the first stratum,
## and 500 case triads and 500 control trids in the second.
## The fetal effects vary across strata,
## whereas the maternal effects are the same.
## One percent of the case triads are missing at random in the second stratum.
hapRun(nall = c(2,2), n.strata = 2, cases = c(mfc=500),
controls = list(c(mfc=200),c(mfc=500)), haplo.freq = rep(0.25,4), maternal = TRUE,
RR = list(c(1.5,1,1,1),c(1,1,1,1)), RRstar = c(1,1,1,1),
RR.mat = c(1.5,1,1,1), RRstar.mat = c(1,1,1,1),
gen.missing.cases = list(NULL,0.01), use.missing = TRUE, hapfunc = "haplinStrat",
n.sim = 100, ask = FALSE)
## Simulate Haplin results from 100 files using haplin.
## The files consist of fetal effects at one diallelic locus,
## corresponding to haplo.freq = rep(0.5,2), RR = c(1.5,1) and RRstar = c(1,1).
## We have a combination of 100 case triads and
## 100 control triads with no missing data.
## No environmental effects are considered.
hapRun(nall = c(2), n.strata = 1, cases = c(mfc=100), controls = c(mfc=100),
haplo.freq = rep(0.5,2), RR = c(1.5,1), RRstar = c(1,1),
hapfunc = "haplin", n.sim = 100, dire = "simfiles", ask = FALSE)
}
Run the code above in your browser using DataLab