Calcite | Level 5

## What is the code to run an ordinal logistic regression in SAS Version: 9.4 (onDemand for Academics)

Hi! I am a thesis student and I do not have a strong background in statistics. I need to run an ordinal logistic regression and I was not taught how to run this in my courses.

The best way I can describe the data is that I have four independent variables that are continuous and one dependent variables that is ordinal. I believe I am on SAS version 9.4 (I was not sure how to find it so I looked up code that would tell me the version). Any help is greatly appreciated!

5 REPLIES 5
Super User

## Re: What is the code to run an ordinal logistic regression in SAS Version: 9.4 (onDemand for Academi

To find version, run following and check the log.

``````proc product_status;run;
``````

Examples for Ordinal Regression:

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_logistic_examples03.htm

Full Code:

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_logiex3.htm

@mconway wrote:

Hi! I am a thesis student and I do not have a strong background in statistics. I need to run an ordinal logistic regression and I was not taught how to run this in my courses.

The best way I can describe the data is that I have four independent variables that are continuous and one dependent variables that is ordinal. I believe I am on SAS version 9.4 (I was not sure how to find it so I looked up code that would tell me the version). Any help is greatly appreciated!

Calcite | Level 5

## Re: What is the code to run an ordinal logistic regression in SAS Version: 9.4 (onDemand for Academi

Hi thank you so much! We were able to get here but I am still struggling with frequency. I have four levels to my dependent variable if that helps. I have listed the code with what we have. Thanks again! Any help is greatly appreciated!

proc hplogistic data=MYLIB NAME;

/*freq freq;/*

model Dependent Variable= Independent Variable 1 |Independent Variable 2 |Independent Variable 3| Independent Variable 4 |Independent Variable 5 |Independent Variable 6;

title 'Multiple Response Cheese Tasting Experiment';

run;

Super User

## Re: What is the code to run an ordinal logistic regression in SAS Version: 9.4 (onDemand for Academi

Frequency is only required if you have a variable that indicates how many types that particular situation/case occured. You may not need it at all.
Super User

SAS Super FREQ

## Re: What is the code to run an ordinal logistic regression in SAS Version: 9.4 (onDemand for Academi

``````/* Put SAS version ("long" -> with maintenance release and P-date)*/
%PUT &=sysvlong;

/* Put version of every module in LOG */
proc product_status; run;``````

Also, check here (look at first 3 hits) :
https://www.lexjansen.com/search/searchresults.php?q=ordinal%20logistic%20regression

Koen

Discussion stats
• 5 replies
• 391 views
• 2 likes
• 4 in conversation