Programming the statistical procedures from SAS

Glimmix /Nlmixed problem

Posts: 0

Glimmix /Nlmixed problem


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

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

RANDOM Intercept group=dv /subject=V001;

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 !
Posts: 31

Re: Glimmix /Nlmixed problem

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! Smiley Happy

Posts: 0

Re: Glimmix /Nlmixed problem

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 Smiley Happy

Thank you!
Posts: 31

Re: Glimmix /Nlmixed problem

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.

Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation