power.calc.linear {genpwr}R Documentation

Function to Calculate Power for Linear Models

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.calc.linear(
  N = NULL,
  MAF = NULL,
  ES = NULL,
  R2 = 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

Vector of effect sizes (difference in means) to detect. Either ES or R2 must be specified.

R2

Vector of R-squared values to detect. Either ES or R2 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', 'Additive1', '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.calc.linear(N=1000,
    MAF=0.1, ES=3,sd_y = 1,Alpha=0.05,
    True.Model='All', Test.Model='All')


[Package genpwr version 1.0.4 Index]