|
|||
|
Robin, thank you very much for your explanation. I too was suspicious of a
similar correction, however the on-line documentation does not provide such technical details (at least that I am aware of). As for the other question on the equivalent of MDC in PROC POWER, I came across the following note in the on-line docs: Some of the analyses in the POWER procedure focus on precision rather than power. An analysis of confidence interval precision is analogous to a traditional power analysis, with "CI Half-Width" taking the place of effect size and "Prob(Width)" taking the place of power. The CI Half-Width is the margin of error associated with the confidence interval, the distance between the point estimate and an endpoint. The Prob(Width) is the probability of obtaining a confidence interval with at most a target half-width. --> Do you think HALFWIDTH= option in the TWOSAMPLEMEANS / ONESAMPLEMEANS statements is the equivalent of MDC? --> The HALFWIDTH= option is not available for the TWOSAMPLEFREQ / ONESAMPLEFREQ statements. So how should we proceed there? Cheers, Bora Y. |---------+-------------------------------> | | | | | Robin High | | | <robinh@unlserve.unl| | | .edu> | | | | | | 26/06/2006 21:07 | | | | |---------+-------------------------------> >---------------------------------------------------------------------------------------------------------------------------| | | | To: Bora Yavuz <BoraYavuz@HSBC.COM.TR> | | cc: SAS-L@LISTSERV.UGA.EDU | |Subject: Re: PROC POWER Does Not Agree With Sample Size Calculation Formula? | >---------------------------------------------------------------------------------------------------------------------------| > I'm trying to do a standard sample size calculation to detect the > difference between two proportions, and to check whether the result agrees > with PROC POWER. > > The usual formula is: > > n = (Zæ + Zß)^2 * (p1*q1 + p2*q2) / MDC^2 > > where > > n = Minimum sample size (to be calculated) > Zæ = Z-coefficient for the Type-I error rate > Zß = Z-coefficient for the Type-II error rate > p1 = Estimate of population proportion 1 > q1 = 1 - p1. > p2 = Estimate of population proportion 2 > q2 = 1 - p2 > MDC = Minimum detectable change (defined in absolute terms) > > Let's create an example: > > One-Sided or Two-Sided? --> Two-Sided > Alpha (Type-I Error) --> 0.05 > Beta (Type-II Error) --> 0.50 > Population-1 Proportion Estimate --> 0.25 > Population-2 Proportion Estimate --> 0.20 > MDC (Change You Want to Detect) --> 0.05 > > The formula yields: > > n = (1.96 + 0)^2 * (.25 * .75 + .20 *. 80) / (0.05)^2 = 534. This is > presumably the minimum sample size that one should get from each > population. > > However, the following PROC POWER code gives n = 574: > > PROC POWER; > TWOSAMPLEFREQ > TEST = fisher /*lrchi*/ /*pchi*/ /*fisher lrchi*/ > SIDES = 2 > ALPHA = .05 > GROUPPROPORTIONS = (.25 .2) > NPERGROUP = . > POWER = .50 > ; > RUN; > > My questions are: > > 1) Why do the two results not agree? The following DATA step closely replicates your PROC POWER and hand calculations. DATA xy; drop pb qb; LABEL n = "Minimum sample size" Za = "Z Type-I" zb = "Z Type-II" p1 = "proportion 1" p2 = "proportion 2" MDC = "Minimum detectable change"; p1=.25; p2=.2; q1 = 1 - p1; q2 = 1 - p2; mdc = ABS(p1-p2); za=probit(.975); zb=probit(.5); n = ((Za + Zb)**2) * (p1*q1 + p2*q2) / MDC**2; * sample size formula from Fleiss, "Statistical Methods for Rates and Proportions, 3rd ed. , p. 72 basically replicates this result They give a source how this formula gives values that are too low ; pb=(p1+p2)/2; qb=1-pb; nn = ((za*sqrt(2*pb*qb)) + (zb* (sqrt((p1*q1) + (p2*q2)))))**2 / ( (p2-p1)**2 ); * to result SAS provides with PROC POWER is close to the following which incorporates a continuity correction also given on p. 72 ; npg =ROUND((nn/4) * (1+ SQRT(1+ (4/(nn*ABS(p2-p1)))))**2+.5,1); * which is close to what SAS PROC POWER gives; PROC PRINT LABEL; run; Minimum proportion proportion detectable 1 2 q1 q2 change 0.25 0.2 0.75 0.8 0.05 Minimum Z sample Type-I Z Type-II size nn npg 1.95996 -4.0638E-17 533.963 535.884 576 ^^^^^^^ ^^^ your Fleiss continuity formula result corrected n So I assume SAS includes a "correction" to increase the sample size. HTH, Robin High Univ. of Oregon |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SUMMARY Difference between PROC SORT NODUPKEY and PROC SQL? | Sally Muller | Newsgroup comp.soft-sys.sas | 0 | 03-03-2009 03:09 PM |
| Re: Sample size for proportions comparison | Dale McLerran | Newsgroup comp.soft-sys.sas | 0 | 07-30-2007 05:04 PM |
| Re: PROC FREQ--DATA STEP--MODELING QUESTION | nospam@HOWLES.COM (Howard Schreier | Newsgroup comp.soft-sys.sas | 0 | 06-07-2007 02:04 AM |
| Power and sample size calculation books | qi zhang | Newsgroup comp.soft-sys.sas | 1 | 04-30-2007 08:13 PM |
| Re: power and sample size calculations | David L Cassell | Newsgroup comp.soft-sys.sas | 0 | 01-04-2007 05:30 AM |