BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Aline1610
Fluorite | Level 6

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star
You have an extra comma that should be removed, after the word YES

View solution in original post

6 REPLIES 6
Astounding
PROC Star
You have an extra comma that should be removed, after the word YES
Aline1610
Fluorite | Level 6

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.Subtypes analysis.png

Astounding
PROC Star

Do you know how to make this happen if you are not using macro language, what the SAS code itself would require?

Aline1610
Fluorite | Level 6

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.

 

Astounding
PROC Star

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.  

Tom
Super User Tom
Super User

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
); 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 6 replies
  • 758 views
  • 1 like
  • 3 in conversation