Programming the statistical procedures from SAS

PROC GLIMMIX with Clustered data and multiple dependent variables

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

PROC GLIMMIX with Clustered data and multiple dependent variables

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.


Accepted Solutions
Solution
‎12-18-2016 09:08 PM
Frequent Contributor
Posts: 132

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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


All Replies
Frequent Contributor
Posts: 132

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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. 

New Contributor
Posts: 4

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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. 

Solution
‎12-18-2016 09:08 PM
Frequent Contributor
Posts: 132

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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?

New Contributor
Posts: 4

Re: PROC GLIMMIX with Clustered data and multiple dependent variables


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?

Respected Advisor
Posts: 2,655

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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

New Contributor
Posts: 4

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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.

Frequent Contributor
Posts: 132

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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

Respected Advisor
Posts: 2,655

Re: PROC GLIMMIX with Clustered data and multiple dependent variables

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 349 views
  • 11 likes
  • 3 in conversation