When I run the macro after compilation it shows this error messages. Anybody with experience of using, could yo help me figure out this. This is the link of the Professor Frank Harrel's psplinet macro: https://biostat.app.vumc.org/wiki/pub/Main/SasMacros/survrisk.txt
There are multiple macro definitions in that file. I would compile all of them. Probably the easiest thing to do would be to paste all the code from that file into your program editor and submit it.
Unfortunately it looks like toward the end of the file there are some data _null_ steps that are not part of a macro definition that use the window statement. You may want to delete this section that starts with:
/****************************************************************/
/* */
/* NAME: SAMSIZA.SAS */
/* TITLE: POWER/SAMPLE SIZE CALCULATION FOR ONE WAY ANOVA */
/* AUTHOR: F. Harrell */
/* DATE: 22 July 1987 */
/* NOTE: This program cannot be run in batch mode. */
/* The program requires the SECSOLVE macro. */
/* */
/****************************************************************/
But most of this file is macro definitions.
The problem is you didn't compile some of the helper macros.
Did you run all the code in the file?
The first error message shown is a call to %DSHIDE which does not resolve, suggesting the macro was not compiled. But looking in the .txt file, the definition is there. So I would start by making sure you run all the code in the .txt file as there are multiple macros definitions in the file. Then try again with a macro call.
There are multiple macro definitions in that file. I would compile all of them. Probably the easiest thing to do would be to paste all the code from that file into your program editor and submit it.
Unfortunately it looks like toward the end of the file there are some data _null_ steps that are not part of a macro definition that use the window statement. You may want to delete this section that starts with:
/****************************************************************/
/* */
/* NAME: SAMSIZA.SAS */
/* TITLE: POWER/SAMPLE SIZE CALCULATION FOR ONE WAY ANOVA */
/* AUTHOR: F. Harrell */
/* DATE: 22 July 1987 */
/* NOTE: This program cannot be run in batch mode. */
/* The program requires the SECSOLVE macro. */
/* */
/****************************************************************/
But most of this file is macro definitions.
The problem is you didn't compile some of the helper macros.
thank you, it worked. I copied everything on the page and pasted and compiled directly in program editor.
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.