R: Power for case-control association design

pbsize2 {gap} | R Documentation

## Power for case-control association design

### Description

This is a revised version of `pbsize` which is appropriate for a case-control design under a range of disease models. Essentially, for given sample size(s), a proportion of which (fc) being cases, the function calculates power estimate for a given type I error (alpha), genotype relative risk (gamma), frequency of the risk allele (p), the prevalence of disease in the population (kp) and optionally a disease model (model). A major difference would be the consideration of case/control ascertainment in `pbsize`.

### Usage

    pbsize2(
      N,
      fc = 0.5,
      alpha = 0.05,
      gamma = 4.5,
      p = 0.15,
      kp = 0.1,
      model = "additive"
    )

### Arguments

`N` | The sample size.
`fc` | The proportion of cases in the sample.
`alpha` | Type I error rate.
`gamma` | The genotype relative risk (GRR).
`p` | Frequency of the risk allele.
`kp` | The prevalence of disease in the population.
`model` | Disease model, i.e., "multiplicative","additive","dominant","recessive","overdominant".

### Details

Internally, the function obtains a baseline risk to make the disease model consistent with Kp as in `tscc` and should produce accurate power estimate. Note it provides power estimates for given sample size(s) only.

### Value

The returned value is the power for the specified design.

### Note

Why is the comparison with power.casectrl so bad?

### Author(s)

Jing Hua Zhao

### See Also

The design follows that of `pbsize`.

### Examples

    ## Not run:
    # single calc
    m <- c("multiplicative","recessive","dominant","additive","overdominant")
    for(i in 1:5) print(pbsize2(N=50,alpha=5e-2,gamma=1.1,p=0.1,kp=0.1, model=m[i]))

    # for a range of sample sizes
    pbsize2(p=0.1, N=c(25,50,100,200,500), gamma=1.1, kp=.1, alpha=5e-2, model='r')

    # create a power table
    f <- function(p)
      pbsize2(p=p, N=seq(100,1000,by=100), gamma=1.1, kp=.1, alpha=5e-2, model='recessive')
    m <- sapply( X=seq(0.1,0.9, by=0.1), f)
    colnames(m) <- seq(0.1,0.9, by=0.1)
    rownames(m) <- seq(100,1000,by=100)
    print(round(m,2))

    library(genetics)
    m <- c("multiplicative","recessive","dominant","partialrecessive")
    for(i in 1:4) print(power.casectrl(p=0.1, N=50, gamma=1.1, kp=.1, alpha=5e-2,
        minh=m[i]))
    power.casectrl(p=0.1, N=c(25,50,100,200,500), gamma=1.1, kp=.1, alpha=5e-2,
        minh='r')
    f <- function(p)
      power.casectrl(p=p, N=seq(100,1000,by=100), gamma=1.1, kp=.1, alpha=5e-2,
        minh='recessive')
    m <- sapply( X=seq(0.1,0.9, by=0.1), f)
    colnames(m) <- seq(0.1,0.9, by=0.1)
    rownames(m) <- seq(100,1000,by=100)
    print(round(m,2))

    ## End(Not run)

[Package gap version 1.2.3-6 Index]