survSNP.power.table {survSNP} | R Documentation |
Table for Asymptotic and Empirical Power
Description
This function produces a table with the resulting empirical and asymptotic power over a given range of Genotype Hazard Ratios, relative allelic frequencies, sample sizes, and event rates.
Usage
survSNP.power.table(GHRs, ns, rafs, erates, pilm, lm, model, test, alpha,
exactvar = FALSE, B = 0)
Arguments
GHRs |
A vector of Genotype Hazard Ratios |
ns |
A vector of sample sizes |
rafs |
A vector of relative allelic frequencies (for the risk allele) |
erates |
A vector of event rates |
pilm |
Probability that the time-to-event is greater than lm |
lm |
Landmark time used for powering the study |
model |
True genetic risk model (choices are "additive", "recessive" or "dominant". For the asymptotic calculations only the "additive" should be used until further notice) |
test |
Hypothesized genetic risk model (choices are "additive", "recessive" or "dominant". For the asymptotic calculations only the "additive" should be used until further notice) |
alpha |
Nominal two-sided type I error rate |
exactvar |
Indicator for using the exact variance formula |
B |
Number of simulation replicates (set to 0 if no empirical calculations are desired) |
Details
This version only supports additive models.
Value
See output of sim.snp.expsurv.power.
Author(s)
Kouros Owzar, Zhiguo Li, Nancy Cox, Sin-Ho Jung and Chanhee Yi
References
Kouros Owzar, Zhiguo Li, Nancy Cox and Sin-Ho Jung. Power and Sample Size Calculations for SNP Association Studies with Censored Time-to-Event Outcomes. https://onlinelibrary.wiley.com/doi/full/10.1002/gepi.21645
Examples
GRRs<-seq(1.5,2,by=0.25)
ns<-c(100,500,1000)
rafs<-c(0.3,0.5,0.7)
erates=c(0.5,0.7,0.9)
res<-survSNP.power.table(GRRs,ns,rafs,erates,pilm=0.5,lm=1,model="additive",
test="additive",alpha=0.05)
# Create key for illustration
KEY=paste("q=",levels(factor(res$raf)),sep="")
KEY<-list(lines=list(col=1:length(KEY),lty=1:length(KEY)),
text=list(labels=paste("q=",levels(factor(res$raf)),sep="")),
column=3)
# Illustrate Power
print(xyplot(pow0~GHR|factor(erate)*factor(n),group=factor(raf),
data=res,type="l",lty=KEY$lines$lty,col=KEY$lines$col,
key=KEY,
xlab="Genotype Hazard Ratio",ylab="Power"))
# Illustrate Power (restricted to n=100)
print(xyplot(pow0~GHR|factor(erate),group=factor(raf),
data=subset(res,n==ns[1]),
type="l",lty=KEY$lines$lty,col=KEY$lines$col,
key=KEY,
xlab="Genotype Hazard Ratio",ylab="Power",
sub=paste("n=",ns[1],", alpha=",round(unique(res$alpha),2))))