Common coefficients in multivariate response models

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
panorris
Posts: 2
Joined: Sat Feb 02, 2013 4:19 pm

Common coefficients in multivariate response models

Post by panorris »

Dear all,

I using runmlwin to create a multivariate response model, with two dependent variables (y1 and y2 - both of which are normally distributed interval measures). In terms of explanatory variables, I wish to include constant terms for each y variable along with two further variables x1 and x2. I use the following command from within Stata to run the model

runmlwin (y1 cons x1 x2, eq(1)) (y2 cons x1 x2, eq(2)), level1(level1id: (cons, eq(1)) (cons, eq(2))) nosort nopause

This command runs successfully and appears to give separate coefficients for x1 and x2 with regards to each of the response variables (y1 and y2), equivalent to using the "add separate coefficient" option in the MLWiN GUI. Now, I would like to have a common coefficient across both y variables associated with the variable x1. Is this possible from within Stata? Does anyone have an example of the syntax?

Kind regards,

Paul
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Common coefficients in multivariate response models

Post by GeorgeLeckie »

Hi Paul,

From memory, the following should work. Please do confirm!

SEPARATE COEFFICIENTS

runmlwin (y1 cons x1 x2, eq(1)) (y2 cons x1 x2, eq(2)), level1(level1id: (cons, eq(1)) (cons, eq(2))) nosort nopause


COMMON COEFFICIENTS

runmlwin (y1 cons x2, eq(1)) (y2 cons x2, eq(2)) (x1, eq(1/2)), level1(level1id: (cons, eq(1)) (cons, eq(2))) nosort nopause

Best wishes

George
panorris
Posts: 2
Joined: Sat Feb 02, 2013 4:19 pm

Re: Common coefficients in multivariate response models

Post by panorris »

Hi George,

Many thanks for the reply. I just tried it, and it seems to run perfectly.

Best wishes,

Paul
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Common coefficients in multivariate response models

Post by GeorgeLeckie »

Great news, thank you for confirming
George
Post Reply