From: Berta <ibanez_at_bioef.org>

Date: Tue, 17 Apr 2007 14:10:47 +0200

(Note that it is dificult to find people from subpopulation A)

R-help_at_stat.math.ethz.ch 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. Received on Tue 17 Apr 2007 - 12:27:17 GMT

Date: Tue, 17 Apr 2007 14:10:47 +0200

Hi R-users,

I want to calculate the sample size needed to carry out a 2-sample
proprotion test (with alfa=0.05, beta=0.8)

1.- probability of success in subpopulation A: 0.8 2.- probability of success in subpopulation B: 0.05 3.- percentage of population in subpopulation A = 5%, 4.- percentage of population in subpopulation B= 95% (the rest, A and Bcomplementary)

(Note that it is dificult to find people from subpopulation A)

Using library(Hmisc) (or others if exist?), I would like to know which one of these three options (if any) should I use:

**# FIRST:
**

bsamsize(p1=0.8, p2=0.05, fraction=0.05, alpha=.05, power=.8)

# n1 n2

**# SECOND:
**

samplesize.bin(alpha=0.05, beta=0.8, pit=0.8, pic=0.05, rho=0.05)

# n= 42

# THIRD: To calculate sample size assuming fraction=0.5 and then multiplying

by 0.05:

bsamsize(p1=0.8, p2=0.05, fraction=0.5, alpha=.05, power=.8)

# n1 n2

# 5.47 5.47

# so that n=6*100/5=120

Taking into account the difficulty of obtaining the samples, which method would be recomended? Or in other words, how many people should I find, around 30-40 or 120?

Thanks a lot in advance,

Berta

R-help_at_stat.math.ethz.ch 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. Received on Tue 17 Apr 2007 - 12:27:17 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 17 Apr 2007 - 13:30:52 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*