BookmarkSubscribeRSS Feed
393310
Obsidian | Level 7

Hello, 

 

I am interested in a model with multiple outcomes, multiple predictors with multiple levels to each variable. I have previously used glimmix for multi-level models, but was wondering if it has the capability to do multiple outcomes as well? 

 

If not, what can I use to examine multiple levels but also run a multivariate multiple logistic regression? 

 

Thanks.

12 REPLIES 12
PaigeMiller
Diamond | Level 26

@393310 wrote:

 

I am interested in a model with multiple outcomes ...


Multiple outcome variables, or multiple values of one outcome variable (or both)?

 

Please do not post the same question more than once.

--
Paige Miller
sbxkoenk
SAS Super FREQ

Hello,

 

As you have specified "multivariate" instead of "multinomial"

, I guess you are speaking about more than one outcome / response / target variable here.

 

In the SAS/STAT 15.3 doc (PROC GLIMMIX MODEL statement) , it seems you can only specify 1 response variable :
https://go.documentation.sas.com/doc/en/statug/15.3/statug_glimmix_syntax15.htm

( in PROC GLM f.e. you can specify more than one dependent variable , but you cannot do multi-level there ).

Maybe there are some ways around :
I know you can do "Joint Modeling of Binary and Count Data"
https://go.documentation.sas.com/doc/en/statug/15.3/statug_glimmix_examples08.htm

I know you can also do  "Joint modelling of longitudinal and time-to-event data".

 

I think there should be a way , but not having enough experience myself here.

 

Koen

 
393310
Obsidian | Level 7

Hello, 

 

I am interested in a model with multiple outcomes, multiple predictors with multiple levels to each variable. I have previously used glimmix for multi-level models, but was wondering if it has the capability to do multiple outcomes as well? 

 

If not, what can I use to examine multiple levels but also run a multivariate multiple logistic regression? 

 

Thanks.

393310
Obsidian | Level 7

Both. I have multiple response variables each with multiple choices to them (1-5). I also have multiple predictors. 

 

I wanted something like :

 

model A (ref="1") B( ref="1) C (ref="1")=XYZ

 

It needs to be a logistic regression as it is categorical data.

 

Can I do this? or is the only way to do it to run each outcome separately if I want to still examine the various levels of the response variables?

PaigeMiller
Diamond | Level 26

As far as I know (and would be happy to be proved wrong), there are no SAS procedures that fit multiple Y variables in a logistic model. In fact, I am not even aware of any methods proposed in the literature (and again I would be happy to be proved wrong) to handle logistic regression for multiple Y variables, other than fit one model at a time.

 

For continuous Y variables, where there are several procedures which fit models to multiple Y variables (including PROC GLM and PROC PLS and probably a number of others). If you can take your 1-5 responses and envision them as "sort-of continuous", maybe that's a way to go. Or maybe not.

--
Paige Miller
sbxkoenk
SAS Super FREQ

Of course, from three multinomial response variables with 5 levels each, you can create a new multinomial response with 5**3 = 125 levels. And then the latter becomes your response (dependent variable).

Koen

 
PaigeMiller
Diamond | Level 26

@sbxkoenk wrote:

Of course, from three multinomial response variables with 5 levels each, you can create a new multinomial response with 5**3 = 125 levels. And then the latter becomes your response (dependent variable).

Koen

 

I think that would produce a model that is a nightmare to interpret, and possibly too sparse to fit a model to.

--
Paige Miller
sbxkoenk
SAS Super FREQ

Absolutely true.
5**3 is a bit "exaggerated".
There will be problems with rare outcome categories.
And the classical link function (generalised logits) for multinomial logistic regression presumably also does not provide enough flexibility to sufficiently cover all outcome categories (accuracy / precision / recall).

Thus ... not a good idea , but a theoretical possibility !

Koen

 
jiltao
SAS Super FREQ

You can use something like the following to fit a multivariate logistic regression model in PROC GLIMMIX:

 

subject y variable $ x
1 1 y1 3
1 0 y2 3
2 0 y1 2
2 1 y2 2

.....

 

proc glimmix data=yourdata;
class subject variable;
model y=x varriable x*variable / dist=binary link=logit;
random _residual_ / type=un subject=subject;

run;

 

You might add a RANDOM statement to model the multilevel part of your data.

 

Hope this helps,

Jill

 

PaigeMiller
Diamond | Level 26

@jiltao 

 

Would a maximum likelihood algorithm to find the solution of your multiple Y-variable PROC GLIMMIX produce the same parameter estimates as running PROC GLIMMIX separately for each Y. I don't know it would, in fact it seems to me (without doing any research) that it would not produce the same estimates as running PROC GLIMMIX separately for each Y.

--
Paige Miller
jiltao
SAS Super FREQ

@PaigeMiller No, the results would not be the same due to the modeling of the correlations in the multivariate responses with the R-side random effect.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 12 replies
  • 2391 views
  • 3 likes
  • 4 in conversation