20 likes | 174 Vues
This study explores the relationship between genotype and binary outcomes, where the probability of success is influenced by genotype. We derive probabilities based on genotype (AA, Aa, aa) and calculate odds ratios (OR) to explain variations in outcomes. By simulating data using rbinom, we generate binary responses and utilize statistical models (additive and recessive) to assess significance through p-values. Our ultimate goal is to evaluate the statistical power across varying scenarios, providing insights into the genetic effects on the outcomes based on multiple simulations.
E N D
Y is binary (0/1), prob Y=1 depends on genotype, g • prob = odds / (1+odds) • odds = prob / (1-prob) Prob(g) Genotype, g Odds(Y|g) Prob(Y|g) OR=3 (1-p)2 AA 1/4 1/5 2p(1-p) Aa 3/4 3/7 p2 aa OR=20 5 5/6 y=rbinom(n, 1, prob.y) • Knowing p (and n) lets us generate g • Odds(Y|AA), the two log-ORs, and g tells us how to generate data g=rbinom(n, 2, p)
Basic outline • Write function to generate data • Write function(s) to fit add/dom/recc models, and return p-values • Use both LOTS of times, and see how often p<0.05; this proportion is the power • Finally, repeat for different p, Odds(Y|AA) and log ORs. Record the power each time