Hello,
Can one use the ‘keep’ statement to select variables of interest from a survey data (particularly BRFSS data) into a subset dataset?
The following is my SAS code.
Thank you
Data BRFSS2018b3;
Set BRFSS2018b;
SEX=SEX1;
keep IYEAR SEQNO _AGE80 _STSTR _psu _LLCPWT MEDCOST HLTHPLN1 EMPLOY1 INCOME2 _EDUCAG EMPLOY1 _RACE SEX;
;RUN;
Yes.
Basic response would be "try it an see".
Thank you so much for your prompt response.
My main concern was about the weights. So the weights are not affected as long as I am not creating a subset within a variable, right?
Thank you
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.