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
Common coefficients in multivariate response models
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Common coefficients in multivariate response models
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
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
Re: Common coefficients in multivariate response models
Hi George,
Many thanks for the reply. I just tried it, and it seems to run perfectly.
Best wishes,
Paul
Many thanks for the reply. I just tried it, and it seems to run perfectly.
Best wishes,
Paul
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Common coefficients in multivariate response models
Great news, thank you for confirming
George
George