From: Bminer on
If anyone has experience with Proc power:

What does NULLPROPORTIONDIFF do exactly?

Thanks

brian
From: Robin R High on
It appears to allow you to specify a difference in the two proportions
other than 0 for a null hypothesis

* e.g., Test H0: p1 - p2 = .01 ;

PROC POWER;
TWOSAMPLEFREQ
TEST = pchi
SIDES = 2
ALPHA = .05
GROUPPROPORTIONS = (.45 .25)
NULLPROPORTIONDIFF=.01 /* need to enter TEST=pchi and either
GROUPPROPORTIONS or PROPORTIONDIFF options */
NTOTAL = 100
POWER = .
;
RUN;

Robin High
UNMC




Bminer <b_miner(a)LIVE.COM>
Sent by: "SAS(r) Discussion" <SAS-L(a)LISTSERV.UGA.EDU>
08/25/2008 08:20 PM
Please respond to
Bminer <b_miner(a)LIVE.COM>


To
SAS-L(a)LISTSERV.UGA.EDU
cc

Subject
Proc Power






If anyone has experience with Proc power:

What does NULLPROPORTIONDIFF do exactly?

Thanks

brian
From: Jeff on
On Aug 26, 9:44 am, rh...(a)UNMC.EDU (Robin R High) wrote:
> It appears to allow you to specify a difference in the two proportions
> other than 0 for a null hypothesis
>
> * e.g., Test H0: p1 - p2 = .01 ;
>
> PROC POWER;
> TWOSAMPLEFREQ
>    TEST = pchi
>    SIDES = 2
>    ALPHA = .05
>    GROUPPROPORTIONS = (.45 .25)
>    NULLPROPORTIONDIFF=.01      /* need to enter TEST=pchi and either
> GROUPPROPORTIONS or PROPORTIONDIFF options */
>    NTOTAL = 100
>    POWER = .
> ;
> RUN;
>
> Robin High
> UNMC
>
> Bminer <b_mi...(a)LIVE.COM>
> Sent by: "SAS(r) Discussion" <SA...(a)LISTSERV.UGA.EDU>
> 08/25/2008 08:20 PM
> Please respond to
> Bminer <b_mi...(a)LIVE.COM>
>
> To
> SA...(a)LISTSERV.UGA.EDU
> cc
>
> Subject
> Proc Power
>
> If anyone has experience with Proc power:
>
> What does NULLPROPORTIONDIFF do exactly?
>
> Thanks
>
> brian

Hi Robin-

Am I alone in often finding SAS documentation really lacking? It is a
struggle to figure out what does what.

So this begs the question about the difference between PROPORTIONDIFF
and NULLPROPORTIONDIFF?

I would have thought that GROUPPROPORTIONS = (.45 .25)
would imply H0: .45 -.25 = 0.15 or a proportion difference
(PROPORTIONDIFF) in the null of 0.15.

But I do see that SAS uses p2-p1 in PROPORTIONDIFF. So I find that

GROUPPROPORTIONS = (.45 .25)

is the same as:

refproportion= 0.45
PROPORTIONDIFF= -0.25

Am I missing something?
From: Robin R High on
Jeff,

Sometimes examples help to explain, though with all the configurations,
it's difficult to write documentation that covers all the possibilities.

The first statement below tests HO: p1 - p2 = 0 versus a difference as
large as p1 - p2 = .45 - .25 = .20

PROC POWER;
TWOSAMPLEFREQ
TEST = pchi
SIDES = 2
ALPHA = .05
GROUPPROPORTIONS = (.45 .25)
NULLPROPORTIONDIFF=0
NTOTAL = 100
POWER = .
;
RUN;

The second of the two GROUPPROPORTIONS is the "reference level", so
equivalent code as above with the other statements would be:

PROC POWER;
TWOSAMPLEFREQ
TEST = pchi
SIDES = 2
ALPHA = .05
REFPROPORTION = .25
PROPORTIONDIFF=.20
NTOTAL = 100
POWER = .
;
RUN;

... or you can pick the first (.45) and test for a -.20 difference

PROC POWER;
TWOSAMPLEFREQ
TEST = pchi
SIDES = 2
ALPHA = .05
REFPROPORTION = .45
PROPORTIONDIFF=-.20
NTOTAL = 100
POWER = .
;
RUN;

All three examples compute power to be 0.556.

Confusion can result because the variance of a difference depends on the
two values of the two proportions you want to test, that is, any of the
three adjacent pairs of 0.05, 0.25, 0.45, and 0.65 have a difference of
..2, but power to detect that difference of .2 depends on which pair you
consider.

I prefer to keep it relatively clear what values I'm testing, so enter the
GROUPPORTIONS option.

Robin High
UNMC






Jeff <jeffrey.m.allard(a)GMAIL.COM>
Sent by: "SAS(r) Discussion" <SAS-L(a)LISTSERV.UGA.EDU>
08/26/2008 09:52 AM
Please respond to
Jeff <jeffrey.m.allard(a)GMAIL.COM>


To
SAS-L(a)LISTSERV.UGA.EDU
cc

Subject
Re: Proc Power






On Aug 26, 9:44 am, rh...(a)UNMC.EDU (Robin R High) wrote:
> It appears to allow you to specify a difference in the two proportions
> other than 0 for a null hypothesis
>
> * e.g., Test H0: p1 - p2 = .01 ;
>
> PROC POWER;
> TWOSAMPLEFREQ
> TEST = pchi
> SIDES = 2
> ALPHA = .05
> GROUPPROPORTIONS = (.45 .25)
> NULLPROPORTIONDIFF=.01 /* need to enter TEST=pchi and either
> GROUPPROPORTIONS or PROPORTIONDIFF options */
> NTOTAL = 100
> POWER = .
> ;
> RUN;
>
> Robin High
> UNMC
>
> Bminer <b_mi...(a)LIVE.COM>
> Sent by: "SAS(r) Discussion" <SA...(a)LISTSERV.UGA.EDU>
> 08/25/2008 08:20 PM
> Please respond to
> Bminer <b_mi...(a)LIVE.COM>
>
> To
> SA...(a)LISTSERV.UGA.EDU
> cc
>
> Subject
> Proc Power
>
> If anyone has experience with Proc power:
>
> What does NULLPROPORTIONDIFF do exactly?
>
> Thanks
>
> brian

Hi Robin-

Am I alone in often finding SAS documentation really lacking? It is a
struggle to figure out what does what.

So this begs the question about the difference between PROPORTIONDIFF
and NULLPROPORTIONDIFF?

I would have thought that GROUPPROPORTIONS = (.45 .25)
would imply H0: .45 -.25 = 0.15 or a proportion difference
(PROPORTIONDIFF) in the null of 0.15.

But I do see that SAS uses p2-p1 in PROPORTIONDIFF. So I find that

GROUPPROPORTIONS = (.45 .25)

is the same as:

refproportion= 0.45
PROPORTIONDIFF= -0.25

Am I missing something?