BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ChuksManuel
Pyrite | Level 9

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;
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

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
  • 1 reply
  • 647 views
  • 2 likes
  • 2 in conversation