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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.