Hello programmers,
I wanted to run an analysis taking into account complex sampling. Can anyone help me check my codes? They did not run. New to macros. It didn't give me any errors in the log.
%Macro Printit;
%surveygenmod(data=adult_asthma3, y=urg_tim,x=MDD mold age smoker income smoke_inside educate,
dist=binomial, link=logit, weight=LLcpwt_F, strata=_ststr, cluster=_psu, fpc=, scale=deviance, intercept=y,
vadjust=n);
run;
%MEND printit;
It may be as simple as you didn't actually have SAS run the macro ... this goes after the code you show
%printit
(Although there is no need of a %PRINTIT macro, you could just run %SURVEYGENMOD outside of the %PRINTIT macro)
Otherwise, if that's not it: A brief comment — saying the code doesn't run never gives us any useful information. Show us the log, with nothing chopped out. Click on the </> icon and paste the log, as text, into the window that appears.
For macros, you need to run the command OPTIONS MPRINT; before your run the macro.
It may be as simple as you didn't actually have SAS run the macro ... this goes after the code you show
%printit
(Although there is no need of a %PRINTIT macro, you could just run %SURVEYGENMOD outside of the %PRINTIT macro)
Otherwise, if that's not it: A brief comment — saying the code doesn't run never gives us any useful information. Show us the log, with nothing chopped out. Click on the </> icon and paste the log, as text, into the window that appears.
For macros, you need to run the command OPTIONS MPRINT; before your run the macro.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.