Learn R Programming

qtlDesign (version 0.953)

Power calculations: Power, sample size, and detectable effect size calculations

Description

Power, sample size, and minimum detectable effect size calculations are performed for backcross, F2 intercross, and recombinant inbred (RI) lines.

Usage

powercalc(cross,n,effect,sigma2,env.var,gen.var,thresh=3,sel.frac=1,
          theta=0,bio.reps=1)
detectable(cross,n,effect=NULL,sigma2,env.var,gen.var,power=0.8,thresh=3,
           sel.frac=1,theta=0,bio.reps=1)
samplesize(cross,effect,sigma2,env.var,gen.var,power=0.8,thresh=3,
           sel.frac=1,theta=0,bio.reps=1)

Value

For powercalc the power is returned, along with the proportion of variance explained. For detectable the effect size detectable is returned, along with the proportion of variance explained. For backcross and RI lines this is the effect of an allelic substitution. For F2 intercross the additive and dominance components are returned. For samplesize the sample size (rounded up to the nearest integer) is returned along with the proportion of variance explained.

Arguments

cross

String indicating cross type which is "bc", for backcross, "f2" for intercross, and "ri" for recombinant inbred lines.

n

Sample size

sigma2

Error variance; if this argument is absent, env.var and gen.var must be specified.

env.var

Environmental (within genotype) variance

gen.var

Genetic (between genotype) variance due to all loci segregating between the parental lines.

effect

The QTL effect we want to detect. For powercalc and samplesize this is a numeric (vector). For detectable it specifies the relative magnitude of the additive and dominance components for the intercross. The specification of effect depends on the cross. For backcross, it is the difference in means the heterozygote and homozygote. For RI lines it is half the difference in means of the homozygotes, for intercross, it is a two component vector of the form c(a,d), where a is the additive effect (half the difference between the homozygotes), and d is the dominance effect (difference between the heterozygote and the average of the homozygotes). The genotype means will be -a-d/2, d/2, and a-d/2. For detectable, optionally for the intercross, one can use a string to specify the QTL effect type. The strings "add" or "dom" are used to denote an additive or dominant model respectively for the phenotype. It may be it can be a numerical vector of the form c(a,d) indicating the relative magnitudes of the additive and dominance components (as defined above). The default is "add".

power

Proportion indicating power desired

thresh

LOD threshold for declaring significance

sel.frac

Selection fraction

theta

Recombination fraction corresponding to a marker interval

bio.reps

Number of biological replicates per unique genotype. This is usually 1 for backcross and intercross, but may be larger for RI lines.

Author

Saunak Sen, Jaya Satagopan, Karl Broman, and Gary Churchill

Details

These calculations are done assuming that the asymptotic chi-square regimes apply. A warning message is printed if the effective sample size is less than 30 and either sel.frac is less than 1 or theta is greater than 0. First we calculate the effective sample size using the width of the marker interval and the selection fraction. The QTL is assumed to be in the middle of the marker interval. Then we use the fact that the non-centrality parameter of the likelihood ration test is \(m*\delta^2\), where \(m\) is the effctive sample size and \(\delta\) is the QTL effect measured as the deviation of the genotype means from the overall mean. The chi-squared approximation is used to calculate the power. The minimum detectable effect size is obtained by solving the power equation numerically using uniroot. The theory behind the information calculations is described by Sen et. al. (2005).

A key input is the error variance, sigma2 which is generally unknown. The user can enter the error variance directly, or estimate it using env.var and gen.var. The function error.var is used to the error variance using estimates of the environmental variance and genetic variance. Another key input is the effect segregating in a cross, which can be calculated using gmeans2model.

References

Sen S, Satagopan JM, Churchill GA (2005) Quantitative trait locus study design from an information perspective. Genetics, 170:447-64.

See Also

uniroot. error.var, gmeans2effect.

Examples

Run this code
powercalc("bc",100,5,sigma2=1,sel.frac=1,theta=0)
powercalc(cross="ri",n=30,effect=5,env.var=64,gen.var=25,bio.rep=6)
detectable("bc",100,sigma2=1)
detectable(cross="ri",n=30,env.var=64,gen.var=25,bio.rep=8)
samplesize(cross="f2",effect=c(5,0),env.var=64,gen.var=25)

Run the code above in your browser using DataLab