turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Data Mining
- /
- Proc surveyfreq

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 04:41 PM

Dear all,

I am carrying out a national survey, with stratified sampling. To account for this, I am going to use the "proc surveyfreq", but I am wondering how to figure out the weights that I should use.

I would appreciate any feedback, help, links or anything that might help me figure it out.

Thanks in advance.

Best

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:22 PM

For this you have to calculate your weight variable depending on stratification factors.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:24 PM

I would appreciate if you can just let me know briefly how, or refer me to any link. Thanks a lot.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:37 PM

Somewhere you need to have a description of your sample frame(population) and determine how many possible respondents there were. Use proc means or summary to count or sum as appropriate with a CLASS statement of your stratum variable.

Do the same thing with the sample data set.

Match/merge the two datasets by the stratum variable.

Calculate the weight for the strata as: SurveyWeight = populationtotal/sampletotal;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:47 PM

I think you have to adjust your sample counts based on census data. If you are taking gender and age_group as startification factors then use somthing like this.

if gender='M' and age_group='18-25' then wt=1.2;

if gender='F' and age_group='18-25' then wt=1.3;

wt is the weight variable

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:51 PM

Thanks for the detailed response. Yes, it was a simple random sample within each strata. No, I didn't use the proc surveyselect. So, if I understand it correctly, the weight of the subjects in each strata will be the total population divided by the sample size from this strata?? Am I right?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 06:35 PM

Thanks to all, I think I will be able to figure it out from here.

Appreciate it.

Best

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:24 PM

How did you generate your sample? Basically for each record within a strata your weight would be the inverse of the probability of select which is often population//samplesize assuming a simple random sample within each strata. If you did something else it gets more entertaining.

If you used Proc Surveyselect to generate the sample the weights would be in the resulting data by default.

After you have that weight per strata attach it to your data. Easiest might be:

proc sql;

create table weighteddata as

select a.*, b.Surveyweight

from surveydata as a left join weights as b

on a.stratum=b.stratum;

quit;

Assuming: surveydata is your response data set; weights has a variable Surveyweight calculated for each stratum;

your stratum variable is named stratum;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 05:48 PM

That isn't an easy statistical question. It depends on how the sample was chosen. I've seen an entire university course dedicated entirely on how to properly create samples and weights and the corresponding analysis, which all need to line up properly.

Consult a statistician or whomever determined the stratified sampling method.