Simple power calculation

300 Words | Approximately 2 Minutes Read | Last Modified on August 12, 2014

Power of Cochran-Armitage Trend Test for Case Control Association Studies

This is an implementation of https://doi.org/10.1159/000064976. Calculation of $\hat{\sigma}_a$ implements the matrix notation of https://doi.org/10.1002/gepi.10245 (unfortunately this paper is severely flawed with numerous typos in maths)

Latest Version

Usage

catt -h
  usage: catt [-h] [-b f0] [-r gamma] [-p MAF] [-R N] [-S N]
                 [-m {additive,dominant,recessive}] [-a ALPHA]
                 [--alternative {two-sided}]
  
  Cochran-Armitage trend test (CATT) power calculation for case/ctrl genetic
  association studies, implementing Freidlin et al, Hum Hered
  2002;53:146-152
  
  optional arguments:
    -h, --help            show this help message and exit
    -b f0, --baseline_penetrance f0
                          wildtype genotype penetrance, default to 0.01
    -r gamma, --odds_ratio gamma
                          odds ratio, default to 1.0
    -p MAF, --maf MAF     minor allele frequency, default to 0.1
    -R N, --num_cases N   number of cases, default to 500
    -S N, --num_ctrls N   number of ctrls, default to 500
    -m {additive,dominant,recessive,multiplicative}, --moi {additive,dominant,recessive,multiplicative}
                          mode of inheritance, default to "additive"
    -a ALPHA, --alpha ALPHA
                          significance level (test size), default to 0.05
    --alternative {two-sided}
                          alternative hypothesis, default to two-sided

Example

This bash script demonstrates the use of the program. Run it to have a taste!

maf="0.1 0.2 0.3"
OR="1.1 1.2 1.3 1.4"
N="200 500 800"
f0=0.01
moi='additive'
alpha=0.05
for i in $maf; do
  for j in $OR; do
    for k in $N; do
      power=`catt -b $f0 -r $j -p $i -R $k -S $k -m $moi -a $alpha 2> /dev/null`
      echo $power $i $j $k $f0 $alpha $moi
    done
  done
done

Output of the program is disease prevalence (written to stderr stream) and power (written to stdout) stream. To display power only, you can redirect the stderr stream by:

catt ... 2> /dev/null
  Lab
  Github
  Email
  @gaotwang