Calculates the power to detect an difference in means/effect size/regression coefficient, at a given sample size, N, with type 1 error rate, Alpha
ss_envir.calc.linear_outcome(pow = NULL, MAF = NULL, ES_G = NULL,
ES_E = NULL, ES_GE = NULL, P_e = NULL, R2_G = NULL,
R2_E = NULL, R2_GE = NULL, sd_y = NULL, Alpha = 0.05,
True.Model = "All", Test.Model = "All")
Vector of the desired power(s)
Vector of minor allele frequencies
Vector of genetic effect sizes (difference in means) to detect. Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Vector of environmental effect sizes (difference in means) to detect. Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Vector of genetic/environment interaction effect sizes (difference in means) to detect. Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Vector of proportions of the population with exposure to the environmental effect
Vector of genetic R-squared values to detect. Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Vector of environmental R-squared values to detect. Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Vector of genetic/environment interaction R-squared values Either ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified.
Standard deviation of the outcome in the population (ignoring genotype). Either sd_y_x or sd_y must be specified.
the desired type 1 error rate(s)
A vector specifying the true underlying genetic model(s): 'Dominant', 'Additive', 'Recessive' or 'All'
A vector specifying the assumed genetic model(s) used in testing: 'Dominant', 'Additive', 'Recessive' or 'All'
A data frame including the power for all combinations of the specified parameters (Case.Rate, ES, Power, etc)
# NOT RUN {
ss_envir.calc.linear_outcome(pow=0.8, ES_G = 1.2, ES_E = 1.3,
ES_GE = 2, Alpha = 0.05, MAF = 0.1, P_e = 0.2,
sd_y = 10, True.Model = "All", Test.Model = "All")
# }
Run the code above in your browser using DataLab