BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Lucai_sister
Obsidian | Level 7

I am learning NLmeans macro to estimate and test the difference in rates. I use

https://support.sas.com/kb/62/addl/fusion_62362_5_nlmeans.sas.txt

to call NLmeans macro. But there are a lot of errors in the code, and I don't know why. Can anyone help me?

 

By the way, my code was copied from "Macro Argument List Start" to the SAS editor and ran to implement the call to NLmeans. My code is as follows:

 

data insure524;
input n c age;
ln=log(n);
obsRate=c/n;
datalines;
500 42 1
400 101 2
;
proc genmod data=insure524;
class age;
model c=age/dist=poisson offset=ln link=log;
lsmeans age/e diff exp cl;
ods output coef=coeffs;
store out=insmodel;
run;

%NLMeans(instore=insmodel, coef=coeffs, link=log, title=Difference of Age Rates)

This problem has bothered me for a long time, and I hope that there are good people to help me

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Lucai_sister,

 

If you follow the steps in my reply to your question in the other thread, it will work without errors. You can omit steps 4 and 5 and use your code (with the INSURE524 dataset) instead.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @Lucai_sister,

 

If you follow the steps in my reply to your question in the other thread, it will work without errors. You can omit steps 4 and 5 and use your code (with the INSURE524 dataset) instead.

Lucai_sister
Obsidian | Level 7
Thank you so much! It worked very well. you are so sweet!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 702 views
  • 1 like
  • 2 in conversation