- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to compare incidence of flu in two groups of population ; one who got vaccinated with Northern Hemisphere Vaccine (NH)and the other with Southern Hemisphere Vaccine (SH). Proportions of populations are 55% in NH and 45% in SH. Total sample size (NH+SH) is 4,387.
I am trying to know the power of this sample size for this comparison. I used the following code. The result shows computed power is >0.999. But I am not sure the code I used is correct or not.
proc power;
onesamplefreq test=exact sides=1 proportion=0.55 nullproportion=0.45
ntotal=4387 alpha=0.05 power=.;
plot x=n;
run;
Please let me know what is the correct code to get power of that sample size. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SSin,
You want to compare proportions in two independent populations, so the TWOSAMPLEFREQ statement is more appropriate. I take it that 55% and 45% are the proportions vaccinated with NH and SH, respectively, so that the corresponding absolute numbers are about 2413+1974=4387. (By using the NFRACTIONAL option you don't have to worry about the fact that 0.55*4387 is not an integer.) Your code suggests that you prefer an exact test, which would be Fisher's exact test in the two-sample case. Since the sample sizes are fixed, the power of the test depends on the (true) incidence rates in the two groups. So, you need to specify these, which can be done in several different ways (see section "Specify Effects" in table "Summary of Options"). One method is to specify
- a reference proportion, i.e. the incidence rate p1 in one group, say, the NH group and
- the relative risk, i.e. the incidence rate p2 in the other group, divided by p1.
You can specify value lists for both options. Then it makes sense to request a plot (which you did), but not with x=n (because n=4387 is fixed), but with x=effect (i.e. the relative risk in the example above).
Here's a code example using fake data for REFPROPORTION and RELATIVERISK:
proc power;
twosamplefreq
test=fisher
alpha = 0.05
refproportion = 0.005 to 0.010 by 0.0025
relativerisk = 0.33 to 0.83 by 0.05, 1.2 to 3 by 0.2
groupweights = (0.55 0.45)
nfractional
ntotal = 4387
power = .;
plot x=effect;
run;