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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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