Hi Experts 🙂
I wanted to run SAS macro which is called "%newsurv"
(http://www.sascommunity.org/wiki/Kaplan-Meier_Survival_Plotting_Macro_%25NEWSURV)
however, it doesn't work on my SAS.
my sas version is 3.4 for windows 10 64bit.
so I think it is technically qualified to run this macro.
In the log, % command has a problem with the warning message.
and "ERROR 180-322"
So please tell me how to work out this problem...
Shoud I need any other command before %newsurv ??
thank you.
Please post your whole log of the failed step. Just the ERROR message itself does not reveal anything. Use the {i} icon for posting log text, so that horizontal spacing is preserved.
I tried submitting the latest macro. Then I tried submitting the data and lead in code. Finally, I submitted the example macro call. Since I don't actually know what you did, it is hard to say what went wrong for you, but clearly that vertical bar does not belong before the macro call. See if something like that helps.
| %newsurv(data=bmt, time=ftime, cens=STATUS, cen_vl=0,ev_vl=1, method=cif,class=diagnosis,height=4in, summary=0, risklist=0 to 2500 by 500, risklocation=BOTTOM, xmin=0, xmax=2500, xincrement=500,risklabellocation=left, timelist=250 500, timedx=Days,parheader=);
Also be aware that SAS/STAT provides an entire chapter on customizing the Kaplan-Meier plot.
This is what I'm done.
I just follow the macro process in the website, but I don't know why it isn't working yet.
thank you so much for your attention.
That was my point. The web site has a vertical bar. It is incorrect. The code will never work with it.
Thank you so much for your answer.
But the thing is even if I eliminated a vertical bar, it doesn't work yet.
Here's my log message.
---------------------------------------------------------------------------------------------------
WARNING: Apparent invocation of macro NEWSURV not resolved.
80 %newsurv(data=bmt, time=ftime, cens=STATUS, cen_vl=0,ev_vl=1,
-
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
81 method=cif,class=diagnosis,height=4in,
82 summary=0, risklist=0 to 2500 by 500, risklocation=BOTTOM,
83 xmin=0, xmax=2500, xincrement=500,risklabellocation=left,
84 timelist=250 500, timedx=Days,parheader=);
---------------------------------------------------------------------------------------------------
It would be much appreciated if you could give me a help one more time.
thank you.
Have you submitted the code that defines the macro first? I am guessing that you have not.
oh... I didn't do that.
Could tell me how to do this?
Because I'm rockie in the SAS field.
I really appreciate you taking the time.
The macro code was provided in that web page you cited. When I tried it after your first post, it worked after I deleted that incorrect vertical bar.
Can you please clarify how do I run the macro code provided? I would like to use the %newsurv for my data set. I am getting the same error. Can you please help me out.
Thanks,
Satish
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.