power_linear_envir.calc.logistic_outcome: Function to Calculate Power for Linear Models with logistic...

Description Usage Arguments Value Examples

View source: R/logistic_power_function_linear_environment_interaction.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
power_linear_envir.calc.logistic_outcome(
  N = NULL,
  MAF = NULL,
  OR_G = NULL,
  OR_E = NULL,
  OR_GE = NULL,
  sd_e = NULL,
  Case.Rate = NULL,
  k = 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

OR_G

Vector of genetic odds ratios to detect

OR_E

Vector of environmental odds ratios to detect

OR_GE

Vector of genetic/environmental interaction odds ratios to detect

sd_e

Standard deviation of the environmental variable

Case.Rate

Standard deviation of the outcome in the population (ignoring genotype). Either Case.Rate_x or Case.Rate must be specified.

k

Vector of the number of controls per case. Either k or Case.Rate 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

1
2
3
4
pw <- power_linear_envir.calc.logistic_outcome(N=30, 
	OR_G=1.1, OR_E=1.2, OR_GE=1.5, 
	sd_e = 1, MAF=0.2, Case.Rate = 0.2,
	Alpha=0.05, True.Model="All", Test.Model="All")

genpwr documentation built on March 31, 2021, 1:06 a.m.