Programming the statistical procedures from SAS

Sample Size Estimation for Percentages - Difference Between Two Estimates

Reply
Frequent Contributor
Posts: 142

Sample Size Estimation for Percentages - Difference Between Two Estimates

Hi all--


I work in direct marketing analytics and I have been using a free app called "Plan-alyser"  to determine if the required sample sizes  needed to ensure a pre-specified difference between two test response rates can be considered significant.  Going forward I would like to use SAS to determine this.

Plan-alyser asks the user to input the required information:

1. Estimated response rate for the control panel.

2. Estimated response rate for the test panel

3. The Condidence level

How would I replicate this in SAS so I get an output which would determine a value for:

1. The control and test panel sample sizes required for the conditions listed above.

2. The percentage point difference in response  that is considered significant

Is there a "Proc" or something else in SAS that will give me this desired output?

any assistance is appreciated. Thanks!!



Grand Advisor
Posts: 10,062

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

The PROC is either Power or GLMPower.

Also you may find a Wizard in the Sas Programs folder (at least in Windows) titled SAS Power and Sample Size.


Contributor
Posts: 40

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

Hi,

You can use PROC SURVEYSELECT to do sample size partition in SAS.

Here is sample code.

Proc SurveySelect Data = datasetname Out = outdatasetname

Method = SRS /*SRS means Simple random sample*/

Seed = 07271987 /*this is a random & optional number, but in future if you want to generate the same sample with raw data then you need to re mention this seed number*/

Sampsize = 150; /*you can use samprate = .5 (50%)*/

Strata Variablename /*Doing Stratified sample*/

run;

Frequent Contributor
Posts: 142

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

This is good to know but what I really need to know is if the sample size between the test and control based on  two proportions is statistically significant or not. 

Regular Contributor
Posts: 180

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

I think this might help:

proc power;

  TwoSampleFreq Test = Fisher Dist = Exact_Cond Method=Walters

  Alpha = 0.05

  Sides = 2

  GroupProportions = (p1 p2)

  Power = 0.8

  NTotal = .

  ;

where p1 and p2 are the two proportions

Frequent Contributor
Posts: 142

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

Great! I will try this out.

Frequent Contributor
Posts: 142

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

This is good to know but what I really need to know is if the sample size between the test and control based on  two proportions is statistically significant or not.

Frequent Contributor
Posts: 142

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

And quick question is Power = the same as entering the confidence interval?

Respected Advisor
Posts: 2,655

Re: Sample Size Estimation for Percentages - Difference Between Two Estimates

There seems to be a lot of confusion here.  Why would you want to know if the sample size is significantly different?  I would think that you want to know if the proportions are significantly different, given the specified sample size.

Sometimes Wikipedia is your friend.  The definition of statistical power there is in big bold letters--it is the probability that we conclude that the null hypothesis is false given that the null hypothesis is truly false.  Given that, power= in PROC POWER is not the same as entering a confidence interval.

Steve Denham

Ask a Question
Discussion stats
  • 8 replies
  • 387 views
  • 0 likes
  • 5 in conversation