power_envir.calc.linear_outcome {genpwr} | R Documentation |
Function to Calculate Power for Linear Models with logistic environment interaction
Description
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
Usage
power_envir.calc.linear_outcome(
N = 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"
)
Arguments
N |
Vector of the desired sample size(s) |
MAF |
Vector of minor allele frequencies |
ES_G |
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. |
ES_E |
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. |
ES_GE |
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. |
P_e |
Vector of proportions of the population with exposure to the environmental effect |
R2_G |
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. |
R2_E |
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. |
R2_GE |
Vector of genetic/environment interaction R-squared valuesEither ES_G, ES_E, and ES_EG or R2_G, R2_E, and R2_EG must be specified. |
sd_y |
Standard deviation of the outcome in the population (ignoring genotype). Either sd_y_x or sd_y must be specified. |
Alpha |
the desired type 1 error rate(s) |
True.Model |
A vector specifying the true underlying genetic model(s): 'Dominant', 'Additive', 'Recessive' or 'All' |
Test.Model |
A vector specifying the assumed genetic model(s) used in testing: 'Dominant', 'Additive', 'Recessive' or 'All' |
Value
A data frame including the power for all combinations of the specified parameters (Case.Rate, ES, Power, etc)
Examples
pw <- power_envir.calc.linear_outcome(N=100, ES_G = 1.2, ES_E = 1.3,
ES_GE = 2, Alpha = 0.05, MAF = 0.2, P_e = 0.2,
sd_y = 10, True.Model = "All", Test.Model = "All")