es.calc.linear: Function to Calculate Effect Size for Linear Models

Description Usage Arguments Value Examples

View source: R/linear_effect_size_functions.R

Description

Calculates the detectable effect size/regression coefficient, at a given sample size, N, and power, with type 1 error rate, Alpha

Usage

1
2
3
4
5
6
7
8
9
es.calc.linear(
  power = NULL,
  N = NULL,
  MAF = NULL,
  sd_y = NULL,
  Alpha = 0.05,
  True.Model = "All",
  Test.Model = "All"
)

Arguments

power

Vector of the desired power(s)

N

Vector of the desired sample size(s)

MAF

Vector of minor allele frequencies

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

1
2
3
es <- es.calc.linear(N=1000,power=0.8,
    MAF=0.1, sd_y = 1, Alpha=0.05,
    True.Model='All', Test.Model='All')

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