BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Frankzzf
Calcite | Level 5

I'm estimating odds ratio between m_pattern (three categories) and c_pattern (three categories) with the following code.

I found macro for logistics regression with ordinal outcomes, but I failed to find macro for outcomes with more than two categories.

I wonder if there are macro for batch analysis and auto OR table ouput?

proc logistic data=diet.dietary;
class
m_pattern2 (param=ref ref="1");
model c_pattern2 (ref="1")=m_pattern2 /link=glogit rl cl;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

@Frankzzf wrote:
I apologize for not being clear.
i mean a marco that could output word documents with created OR tables from logistic procedure


Macros are not needed. You can use ODS RTF or ODS WORD. Example:

 

ods rtf file="myfile.rtf";
proc logistic data=...;
...
run;
ods rtf close;
--
Paige Miller

View solution in original post

5 REPLIES 5
Ksharp
Super User

I don't understand what you are trying to do .

You should know if your response/Y variable is nominal variable,you would get TWO model separatedly (1 vs 3 and 2 vs 3 if take 3 as a reference level).

And check the example of Doc:

Nominal Response Data: Generalized Logits Model

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_examples04.htm

 

Ksharp_0-1730009854970.png

 

Ksharp
Super User
And better post it at Stat Forum, since it is a question about Statisical Model/Theory.
The experts of Statistic @lvm @StatDave @SteveDenham would see it.


PaigeMiller
Diamond | Level 26

PROC LOGISTIC should do this without a macro. What is it you want that PROC LOGISTIC doesn't do?

--
Paige Miller
Frankzzf
Calcite | Level 5
I apologize for not being clear.
i mean a marco that could output word documents with created OR tables from logistic procedure

PaigeMiller
Diamond | Level 26

@Frankzzf wrote:
I apologize for not being clear.
i mean a marco that could output word documents with created OR tables from logistic procedure


Macros are not needed. You can use ODS RTF or ODS WORD. Example:

 

ods rtf file="myfile.rtf";
proc logistic data=...;
...
run;
ods rtf close;
--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 5 replies
  • 987 views
  • 2 likes
  • 3 in conversation