Programming the statistical procedures from SAS

proc surveyfreq question about strata

New Contributor
Posts: 2

proc surveyfreq question about strata


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;
        strata  district;
        weight  finalwt;

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

Frequent Contributor
Posts: 136

Re: proc surveyfreq question about strata

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

New Contributor
Posts: 2

Re: proc surveyfreq question about strata

Posted in reply to Damien_Mather

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

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation