Hi all,
Using MEPS , I want to pool data from 2017-2021 to use it to analyze the patient provider relationship ( using variables (ADRESP42 and DECIDE42) in patients with caprostate.
I downloaded all files, so can i just use this syntax to pool:
data meps.combine;
set fy21 fy20 fy19 fy18 fy17;
run;
I have read that we need to use surveymeans etc and do weightage. At what point should i use weights in analysis.
Thank you
First yes that code will combine data sets if the FY17 through Fy21 are in the work library since you didn't provide a library name.
I am not familiar with whatever a MEPS may be. If it is data from a complex data collection sampling scheme then you would use the Survey procedures providing the information related to the sample design. What that might be I have no idea since I know nothing of MEPS. You would use a WEIGHT statement in the procedure pointing to the variable holding the sample weight. But you are likely needing additional bits that depend on the sample design such as strata and cluster variables.
A very likely complication is that it is very likely that each of those yearly data files have weight variables that if used as is will result it attempting to use a population that is roughly 5 times to large. The sum of the sample weights generally should be to population total sampled from. If the collection and use is normally done on an annual basis then a combined data set should have the weights adjusted to reflect the total population of a single year.
https://www.cdc.gov/brfss/annual_data/2021/pdf/Complex-Sampling-Weights-and-Preparing-Module-Data-fo... has a section on how to combine multiple years of data from a complex sample survey for analysis. Look for the Combining Multiple Years of BRFSS Data section. It only shows use for two years you just extend it to the 5 sets you are using. Typically multiyear combinations tend us a "middle" year as the target population to use assuming not large changes of population from year to year.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.