BookmarkSubscribeRSS Feed
Jeannie
Calcite | Level 5

Hi.

I'm using SAS 9.4.

I’d like to compare the answers to a survey where two different sampling approaches were used to sample the same population.  Each approach asked the respondents to complete the same survey.  The first approach used a stratified random sample to sample the population and the second approach used a nonprobability sample.  The questions on the surveys are exactly the same and the respondents were surveyed at the same time.  Questions on the survey generally asked the respondents their satisfaction level (usually 4-5 levels) or whether they favored or opposed certain issues related to transportation.  Weights were created for both of the approaches (finalwt). 


The stratified random sample has 5 strata (5 districts which are labeled 1-5 in a variable called district).  The nonprobability sample was not stratified so I created a variable called district which contains all 6's.  There is an indicator variable named ind which is 1 for the non probability sample and 2 for the stratified sample.  The dataset is called panelprob.  The example below shows how I compared the two samples for one of the questions on the survey (Q3). The code works fine. 


proc surveyfreq data= panelprob;
      tables  ind * Q3/CHISQ ROW NOSTD NOCELLPERCENT;
        strata  district;
        weight  finalwt;
run;

My question is:  Have set up the strata correctly?  Thank you.

2 REPLIES 2
Damien_Mather
Lapis Lazuli | Level 10

The type of non -probability sample you drew might make a difference to the answer. What type was it?

Jeannie
Calcite | Level 5

It was a panel sample where the individuals needed to fufill certain criteria (e.g., adults in a certain state).

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 1548 views
  • 0 likes
  • 2 in conversation