BookmarkSubscribeRSS Feed
sa4co4
Calcite | Level 5

I am new to SAS and I need to calculate Charlson and Elixhauser scores using SAS. Did some tries, successfully imported data, tried to run macro but no luck. Got errors.

 

There are few macros available, but I could not find any tutorials for using them. Could you suggest a relevant tutorial?

1 REPLY 1
ballardw
Super User

@sa4co4 wrote:

I am new to SAS and I need to calculate Charlson and Elixhauser scores using SAS. Did some tries, successfully imported data, tried to run macro but no luck. Got errors.

 

There are few macros available, but I could not find any tutorials for using them. Could you suggest a relevant tutorial?


Large economy sized hint: When running code involving macros and getting errors first set Options mprint; Then run the macro. The log will have details of things as the code is generated by the macro. Then copy all the text generated from the macro, the code, notes, warnings and error messages. Then on the forum open a text box using the </> icon above the message window. Paste all that text. The text box is important because many errors generate diagnostics indicating where the problems are found. The text box will retain formatting so those diagnostics appear in the correct position relative to the code where the main message windows will completely reformat text so the diagnostics are not helpful.

 

Without details I would suspect that however you brought the data into SAS does not match one or more requirements of the macro. Likely candidates are variable values of the wrong type or for ICD related things the actual values. I have seen some interesting ways of representing the same ICD-10 (and ICD-9) code values. Quite often other programs expect the values to look differently.

 

You may need to check with the source of the macro you were using for the data requirements and carefully check your data for compliance.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 782 views
  • 1 like
  • 2 in conversation