BookmarkSubscribeRSS Feed
SSin
Obsidian | Level 7

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. 

 

 

3 REPLIES 3
Reeza
Super User
A one sample freq test is not appropriate for your data/experiment IMO, but I'm also not familiar enough with PROC POWER to tell you what is.
SSin
Obsidian | Level 7
Thank you for the comment. If one sample freq test is not appropriate please let me know what is appropriate test. Thank you.
FreelanceReinh
Jade | Level 19

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

  1. a reference proportion, i.e. the incidence rate p1 in one group, say, the NH group and
  2. 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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 603 views
  • 3 likes
  • 3 in conversation