BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
snowland
Fluorite | Level 6

I would like to use Proc Glimmix in SAS 9.3 for multivariate generalized linear mixed modeling for two-level data, however I have dependent variables of different types (continuous, binary). Although there is documentation on joint modeling in SAS documentation for non-clustered data, it is unclear to me how joint models can be used with clustered data (e.g., 2-level model, individuals nested within groups, etc.). Also, when using dependent variables of different types, how are the G-side and R-side variances and covariances computed? Could anyone suggest relevant text for reference (preferably with example SAS codes)?

 

Here's the sample code for my 2-level model:

 

proc glimmix data=multi_glmm method=laplace;
class dist block;
model var = dist dist*IV/noint dist=byobs(dist) solution;
random intercept/subject=block type=vc solution cl;
covtest zeroG/wald;
nloptions gconv=0;
run;


*data are arranged in long form with two dependent variables (var) of different types (binary, continuous) arranged in successive rows. Any suggestions for improving the code will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Damien_Mather
Lapis Lazuli | Level 10

If you look closely at the data structure and model statement you will see there is just one dependent, response or target variable. The two types of linearising link functions are applied depending on the value of the dist variable. One separately linearised, there is nothing structurally different between the two types of contribution to the overall log likelihood. Once you understand that, the interpretation of the role of the random statement and type III tests is easier, right?

View solution in original post

8 REPLIES 8
Damien_Mather
Lapis Lazuli | Level 10

I believe this is explained in the proceedure documentaation, but it takes some digging around to find it. The G- and R-side matricies are computed the same way regardless of dist=byobs(dist) or more ordinary fixed effects specification you use - the var/covar component is pooled/shared between the two (in your case) fixed effect matrix components of the model. 

snowland
Fluorite | Level 6

Thank you very much Damien_Mather. When modeling multiple (in my case two, binary and continuous) dependent variables, how do we interpret the shared "random intercept/subject=level-2 variable". Is it the deviation from the fixed intercepts for the two variables? What do the Type III effects represent? The overall association of the explanatory variables with the dependent variables? It seems that the theory behind using multivariate GLMM is not explained very well in the SAS documentation. 

Damien_Mather
Lapis Lazuli | Level 10

If you look closely at the data structure and model statement you will see there is just one dependent, response or target variable. The two types of linearising link functions are applied depending on the value of the dist variable. One separately linearised, there is nothing structurally different between the two types of contribution to the overall log likelihood. Once you understand that, the interpretation of the role of the random statement and type III tests is easier, right?

snowland
Fluorite | Level 6


Thank you for the good explanation, Damien_Mather. If I were to put the random statement (=level-2 variable) in this bivariate response case, does saying that 'means of the two dependent variables vary (or do not vary) by level-2 variable' appropriate? I guess my question is what would be a good way to put it in words?

SteveDenham
Jade | Level 19

Please post your proposed PROC GLIMMIX code.  It is easier to make comments and suggestions for improving proposed code for something this complex than it is to wrap my head around the description given here.

 

Thanks,

Steve Denham

snowland
Fluorite | Level 6

Hi Steve:

 

I have recorded two responses (one binary and one continuous) from individuals nested within blocks. Now I would like to perform a multivariate analysis using PROC GLIMMIX.

 

Here's the code:

proc glimmix data=multi_glmm;
class dist block individual;
model DepVar = dist dist*ExpVar/noint dist=byobs(dist) solution;
random intercept/subject=block solution cl;
random _residual_/subject=individual(block) type=un solution;
run;

 

*data are arranged in long form with two dependent variables (DepVar) of different types (binary, continuous) arranged in successive rows id'd by block and individual ID. Dist is either binary or normal. My question is how do we appropriately put in words the random intercept for block when there are two dependent variables? Could we say 'the means of the two responses vary (or do not vary) by block'? Thanks.

Damien_Mather
Lapis Lazuli | Level 10

Rather you could say: 'the (separately) linearised means of the two responses vary (or do not vary) substantially by block'

SteveDenham
Jade | Level 19

This code looks good for what you are attempting, and @Damien_Mather's suggested wording for how to write this up is really good, in my opinion.

 

Steve Denham

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
  • 8 replies
  • 2576 views
  • 11 likes
  • 3 in conversation