fampower {FamEvent} | R Documentation |
Simulation-based power calculation for genetic effect
Description
Computes the power of detecting genetic effect in the penetrance model based on a family-based simulation study.
Usage
fampower(N.fam, N.sim, effectsize, beta.sex, alpha = 0.05, side = 2, design = "pop",
variation = "none", interaction = FALSE, depend = NULL, base.dist = "Weibull",
frailty.dist = NULL, base.parms, allelefreq = c(0.02, 0.2), dominant.m = TRUE,
dominant.s = TRUE, mrate = 0, hr = 0, probandage = c(45, 2), agemin = 20, agemax = 100)
Arguments
N.fam |
Number of families to generate. |
N.sim |
Number of simulations. |
effectsize |
Effect size of the major mutated gene ( |
beta.sex |
Gender effect that is fixed in the model. |
alpha |
Significance level. Default value is 0.05. |
side |
Number of sides for the alternative hypothesis. Possible choices are 1 for one-sided test and 2 for two-sided test. Default value is 2. |
design |
Family based study design used in the simulations. Possible choices are: |
variation |
Source of residual familial correlation. Possible choices are: |
interaction |
Logical; if |
depend |
Variance of the frailty distribution. Dependence within families increases with depend value. Default value is |
base.dist |
Choice of baseline hazard distribution. Possible choices are: |
frailty.dist |
Choice of frailty distribution. Possible choices are: |
base.parms |
Vector of parameter values for baseline hazard function.
|
allelefreq |
Vector of population allele frequencies of major and second disease gene alleles. Frequencies must be between 0 and 1. Default frequencies are 0.02 for major gene allele and 0.2 for second gene allele, |
dominant.m |
Logical; if |
dominant.s |
Logical; if |
mrate |
Proportion of missing genotypes, value between 0 and 1. Default value is 0. |
hr |
Proportion of high risk families, which include at least two affected members, to be sampled from the two stage sampling. This value should be specified when |
probandage |
Vector of mean and standard deviation for the proband age. Default values are mean of 45 years and standard deviation of 2 years, |
agemin |
Minimum age of disease onset or minimum age. Default is 20 years of age. |
agemax |
Maximum age of disease onset or maximum age. Default is 100 years of age. |
Details
The power of testing H_0: \beta_{gene} = 0
vs. H_1: \beta_{gene} =
effectsize
is obtained by the proportion of times the null hypothesis is rejected out of the N.sim
simulations.
When interaction = TRUE
, the powers of both the main effect of mutated gend and the interaction effect of mutated gene and gender will be computed.
Value
Returns
power |
Power of detecting the genetic effect. |
Author(s)
Yun-Hee Choi
See Also
Examples
## Example 1: obtain the power for testing the genetic effect
# based on 50 POP families simulated using 100 simulations
## Not run:
set.seed(4321)
fampower(N.fam = 50, N.sim = 100, effectsize = 1, beta.sex = 0.8, alpha = 0.05, side = 2,
design = "pop+", variation = "none", base.dist = "Weibull", allelefreq = 0.02,
base.parms = c(0.01, 3))
## End(Not run)
## Example 2: obtain the power for both the main and interaction effects
# based on 50 POP families simulated using 100 simulations
## Not run:
set.seed(4321)
fampower(N.fam = 50, N.sim = 100, effectsize = c(1.5, 1), beta.sex = 0.8, alpha = 0.05,
side = 2, interaction = TRUE, design = "pop+", variation = "none", base.dist = "Weibull",
allelefreq = 0.02, base.parms = c(0.01, 3))
## End(Not run)