powered by
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_envir.calc( N = NULL, Case.Rate = NULL, k = NULL, MAF = NULL, OR_G = NULL, OR_E = NULL, OR_GE = NULL, P_e = NULL, Alpha = 0.05, True.Model = "All", Test.Model = "All" )
Vector of the desired sample size(s)
proportion of cases in the sample (cases/(cases + controls)).
Vector of the number of controls per case. Either k or Case.Rate must be specified.
Vector of minor allele frequencies
Vector of genetic odds ratios to detect
Vector of environmental odds ratios to detect
Vector of genetic/environmental interaction odds ratios to detect
Vector of proportions of the population with exposure to the environmental effect
the desired type 1 error rate(s)
A vector specifying the true underlying genetic model(s): 'Dominant', 'Additive1', 'Additive2', '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_envir.calc(P_e = 0.2, MAF = 0.1, N = 200, Case.Rate = 0.5, Alpha = 0.05, OR_G = 1.5, OR_E = 2, OR_GE = 1.8, Test.Model = "All", True.Model = "All") # }
Run the code above in your browser using DataLab