BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

It is so great to have a forum like this! I am a new SAS user and often run into some problems.

I am having an issue with my Proc glimmix syntax.

I have am trying to run a multinomial regression with proc glimmix, but I do not know to adjust the code to accomodate that.

My dependent variable(contra) has 3 outcomes:

1= no contraception
2= traditional contraception
3=modern contraception

I have some dummies as independent variables - no education (reference), primary educ, secondary educ

Right now my syntax looks like this :

data library.finalwomen1;
set library.finalwomen1;
proc sort data = library.finalwomen1;
BY v001; /* cluster level variable*/
run;

PROC GLIMMIX data=library.finalwomen1;
CLASS V001;
MODEL contra = primary secondary /link=solution dist=mult covb;

RANDOM Intercept group=dv /subject=V001;
RUN;


I need to use either proc glimmix or proc nlmixed as this is a multilevel dataset and I need to control for clustering.

As I run the above program, the output shows my dependent variable to be ordered. Clearly, it is supposed to be UNORDERED. How do I fix the code? Any help would be wonderful !
3 REPLIES 3
Susan
Calcite | Level 5
A check of the GLIMMIX documentation (see the Syntax section for the MODEL statement) shows that the default link for the multinomial distribution is the cumulative logit, which causes response outcomes to be ordered. See the "Response-Level Ordering and Referencing" section in the GLIMMIX documentation for a description of default ordering and how to change it, if need be.

For unordered response outcomes, you'll want to use the generalized logit link (again, see the Syntax section for the MODEL statement).

Embrace documentation! 🙂

Susan
deleted_user
Not applicable
Thank you so much! I did go back to the glimmix manual and look where you had suggested and found the answers. Will run my model today and hopefully will not get any errors 🙂

Thank you!
Susan
Calcite | Level 5
Since you're a new SAS user, I'll point out that you do not need to code dummy variables for categorical predictors in any SAS procedure that has a CLASS statement, unless you need to for some specific reason. Using the CLASS statement and the implicit tests and estimates that are embedded in the procedure is easier and less error-prone than devising your own ESTIMATE and CONTRAST statements.

Susan

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Discussion stats
  • 3 replies
  • 1139 views
  • 0 likes
  • 2 in conversation