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!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1533 views
  • 1 like
  • 2 in conversation