Hi!
I am working through an example given by SAS to create relative risk from this example: http://support.sas.com/kb/23/003.html
I'm working through it but I am now stuck. I run the preceding code:
data question;
input Gender $ Response $ Count;
datalines;
Women Yes 45
Women No 55
Men Yes 30
Men No 70
;
proc freq data=question order=data;
weight Count;
tables Gender*Response / relrisk;
run;
proc logistic data=question;
freq count;
class gender(ref="Men") / param=glm;
model response(event="Yes")=gender;
lsmeans gender / e ilink;
ods output coef=coeffs;
store out=ques;
run;
So far, so good. HOWEVER, when I submit the suggested %NLMeans macro:
%NLMeans(instore=ques, coef=coeffs, link=logit, options=ratio, title=Relative Risk);
I receive the following message:
"Warning: Apparent Invocation NLMeans not resolved"
Please advise! Thank you in advance!
Cheers,
David
Hi @davidmaron,
You need to download and submit the macro code from http://support.sas.com/kb/62/addl/fusion_62362_5_nlmeans.sas.txt in order to make it available to your SAS session.
Hello, where do I start downloading the code? I started with "Macro Argument List Start" and copied the following code. However, I cannot display the results after using NLmeans. Could you please give me the specific process of using NLmeans? Since I am an initial scholar, I do not know how to use macros for the time being. Thank you very much.
Hello @Lucai_sister,
%include 'your\path\nlest.sas'; %include 'your\path\nlmeans.sas';(of course, with "your\path" replaced by the location you chose for the two .sas files).
Hint: Generally, it is much better to open a new thread than to add questions to an old one (like from 2019), which only a few people will read.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.