BookmarkSubscribeRSS Feed
sfw_09
Calcite | Level 5

Hello,

 

I have two cross sectional survey datasets, one from 2017 and one from 2018. I merged them together, but only 2017 data is weighed with the weight variable _finlwt and includes the strata variable _str. How can I apply the _finlwt and _str variable from 2017 to the responses for 2018 that do not include these variables? My goal is to be able to run proc surveylogistic procedures on the combined dataset with the 2017 weight and stratum variables. 

 

This is my code for merging the two datasets. Thanks for any assistance. 

 

data survey.combined;
set survey.2017 survey.2018;
run;

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Unless I am misunderstanding you, this is not yet a SAS problem, but a problem in determining how to apply weights to a different data set. This is undefined. You need to figure out how to do this in your mind, then explain it to us, before any SAS code could be written.

--
Paige Miller
ballardw
Super User

You really want to find the appropriate sample information for 2018. And then your strata actually become YEAR and _str.

Why do you not have sample information for the 2018 data?

Do  you have reason to believe that the underlying size of the population has not changed between the years? If so then a proportional split of sample weight per strata may not be too cringe worthy. The general approach would be to 1) sum the weights by strata, 2) determine half (or if a known proportionate change in the base population PER STRATA use the proportions ) of the weights for each year, then distribute among the records per strata.

 

Example: sum of weights for strata one in 2017 is 1000 with 40 records, so the strata one modified total weight would be 500 for 2017 and 2018. The weight per record for 2017 would become 500/40. If there are 37 records in strata one in 2018 then the weight per record would be 500/37.

In this scenario YEAR would not be strata variable and more caution would be needed in any projection to a population estimate (number of persons) for any result.

 

If you have the same strata in both years and use the same weights then you will in effect have roughly doubled any population estimate using the sums of weights that would project the number of the population are twice the

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 522 views
  • 0 likes
  • 3 in conversation