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
power_linear_envir.calc.linear_outcome(N = NULL, MAF = NULL,
ES_G = NULL, ES_E = NULL, ES_GE = NULL, sd_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 sample size(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.
Standard deviation of the environmental variable
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 to detect. 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 {
pw <- power_linear_envir.calc.linear_outcome(N=1000,
ES_G=0.5, ES_E=1.6, ES_GE=1.4,
sd_e = 1, MAF=0.28,
sd_y = 5,Alpha=0.05,
True.Model='All', Test.Model='All')
# }
Run the code above in your browser using DataLab