Hallo! I have done a sample size calculation for proportions with EpiR. The input is: treatment group rate p=0.65 control?group rate p=0.50 significance level 0.95 power 0.80 two-sided ration group 1 and 2: 1.0 I have done this in the following way: library(epiR) epi.studysize(treat = 0.65, control = 0.5, n = NA, sigma = NA, power = 0.80, ?? r = 1, conf.level = 0.95, sided.test = 2, method = "proportions") Result: $n [1] 82 PASS 2002 and NQuery give both 170 subjects per group without continuity correction. With continuity correction 183 per group. Looking at http://statpages.org/proppowr.html?I get 182 subjects per group (with continuity correction, I admit). What am I doing wrong? Can anybody explain this? Best wishes Karl
Sample size calculation proportions with EpiR: Discrepancy to other calculators
3 messages · Karl Knoblick, Chuck Cleland, Thomas Lumley
On 5/26/2009 2:53 AM, Karl Knoblick wrote:
Hallo! I have done a sample size calculation for proportions with EpiR. The input is: treatment group rate p=0.65 control group rate p=0.50 significance level 0.95 power 0.80 two-sided ration group 1 and 2: 1.0 I have done this in the following way: library(epiR) epi.studysize(treat = 0.65, control = 0.5, n = NA, sigma = NA, power = 0.80, r = 1, conf.level = 0.95, sided.test = 2, method = "proportions") Result: $n [1] 82 PASS 2002 and NQuery give both 170 subjects per group without continuity correction. With continuity correction 183 per group. Looking at http://statpages.org/proppowr.html I get 182 subjects per group (with continuity correction, I admit). What am I doing wrong? Can anybody explain this?
epi.studysize(treat = .65, control = .50, n = NA, sigma = NA, power = 0.80, r = 1, conf.level = 0.95, sided.test = 2, method = "cohort") gives the same sample size as PASS 2002 and NQuery (170 per group).
Best wishes Karl
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894
On Tue, 26 May 2009, Chuck Cleland wrote:
On 5/26/2009 2:53 AM, Karl Knoblick wrote:
Hallo! I have done a sample size calculation for proportions with EpiR. The input is: treatment group rate p=0.65 control group rate p=0.50 significance level 0.95 power 0.80 two-sided ration group 1 and 2: 1.0 I have done this in the following way: library(epiR) epi.studysize(treat = 0.65, control = 0.5, n = NA, sigma = NA, power = 0.80, r = 1, conf.level = 0.95, sided.test = 2, method = "proportions") Result: $n [1] 82 PASS 2002 and NQuery give both 170 subjects per group without continuity correction. With continuity correction 183 per group. Looking at http://statpages.org/proppowr.html I get 182 subjects per group (with continuity correction, I admit). What am I doing wrong? Can anybody explain this?
epi.studysize(treat = .65, control = .50, n = NA, sigma = NA, power = 0.80, r = 1, conf.level = 0.95, sided.test = 2, method = "cohort") gives the same sample size as PASS 2002 and NQuery (170 per group).
And simulation confirms that the larger numbers are correct. I don't know what is happening with epi.studysize(,method="proportion"). epi.studysize(,method="cohort") doesn't seem exactly appropriate, since judging from the example on the help page the inputs are supposed to be cumulative incidence rather than probabilities. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle