[R] Power calculation
Keniajin Wambui
kiangati at gmail.com
Thu Apr 23 21:17:48 CEST 2015
I am are currently evaluating risk factors associated with a virus A ,
incidence among patients with a follow-up sample of 312. Overall, the
virus incidence rate is estimated at 4.7 per 100 pyr, 95% CI
(3.0-7.4), with a total follow-up time of 383.9 person years and 18
incidence cases.
How can I do a power calculation based on assumptions of the virus
acquisition in patients who have virus B?
For a rate that is twice as high, four times as high, and even eight
times higher.
Virus B
Yes- 203 No-109
I have tried using which gives a very suscpicious power?
v <- qnorm(0.975)
mu <- 0.047
muEst <- 0.094 #for a rate twice as high
n <- 312
#top
left <- (n*((muEst-mu)^2))/mu
left <- sqrt(left)
ucalc<-left -v
ucalc
pnorm(ucalc)
The formula used is at Essential Medical Statistics Book by Betty R
Kirkwood et al pg 420 formula 2.
More information about the R-help
mailing list