Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- What is the code to run an ordinal logistic regression in SAS Version:...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 10-10-2023 03:26 PM
(390 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;/*

/*class Additive(ref='4') / param=ref ;*/

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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

```
/* 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

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

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.