Hello,
I am using for the first time the SAS macro language and i have to perform a conditional logistic regression by subtypes for a nested case-control study.
I downloaded the SAS subtype macro and the associated documentation (please find attached both of them).
I read the documentation and the example related to the nested case-control case and i tried to run the macro by using the code below but it didn't work and i didnt get any suggestions from SAS to know what is wrong. If anyone can help me, thank you in advance !
%INCLUDE "S:\PGM\subtype.sas";
%subtype(
data=LNH_DIOX_tab,
studydesign=MCACO,
exposure= {class_diox},
eventtype= sous_type,
matchid= id_paire,
wald= YES,
);
Aline.
Thank you ! i was so focused on the parameters syntax that i didnt see the coma.
But please i have 2 other questions :
- Why SAS displays the PHREG procedure and shows me hazard ratios instead of odd ratios like in any other conditional logistic regression ? Is it normal ?
- My exposure variable is categorical and i need the ORs for each category of the exposure according to the subtype. What should i add to my code? because for now i only have the following results (please see the table).
Thank you so much for your precious help.
Aline.
Do you know how to make this happen if you are not using macro language, what the SAS code itself would require?
Hello,
Without using the macro SAS language, i transformed the event (composed of 5 subtypes of cancer) into binary variables by creating subpopulations (cases and matched controls) for each subtype of cancer using the first subtype as the reference.
Then i applied the conditional logistic regression for the subpopulations and i got the ORs for each category of the exposure variable ("class_diox")
So now i want to check if i have the same results with the macro but here i only got the overall ORs of class_diox for each subtype of cancer.
I hope it's clear (sorry it's hard for me to explain in english).
Thank you for your help.
Aline.
Don't think I can help with that. I'm a macros guy, not a stats guy. So if I can see the code that is needed (from a statistical standpoint), I can get macro language to generate that code. But I think we need someone who is more of a stats guy to chime in.
If you are having issue then post the log and describe what you think is not working.
Turn on the MPRINT option so you can see the SAS code that the macro generated.
PS: If you get in the habit of placing continuation characters at the beginning of the extra line instead of the end of the previous line you will be less likely to add an extra comma. That way they will be easier for humans to notice when scanning the code.
%subtype
(data=LNH_DIOX_tab
,studydesign=MCACO
,exposure= {class_diox}
,eventtype= sous_type
,matchid= id_paire
,wald= YES
);
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 16. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.