BookmarkSubscribeRSS Feed
Mgarret
Obsidian | Level 7

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!!



8 REPLIES 8
ballardw
Super User

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.


NareshAbburi
Calcite | Level 5

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;

Mgarret
Obsidian | Level 7

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. 

BlueNose
Quartz | Level 8

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

Mgarret
Obsidian | Level 7

Great! I will try this out.

Mgarret
Obsidian | Level 7

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.

Mgarret
Obsidian | Level 7

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

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1820 views
  • 0 likes
  • 5 in conversation