    # Re: st: slopes as outcomes?

 From Jeph Herrin To statalist@hsphsun2.harvard.edu Subject Re: st: slopes as outcomes? Date Wed, 15 Nov 2006 21:44:04 -0500

```Sam,

Your second model is handled by -xtmixed- in a straightforward way:

xtmixed x1 x2 z1 || j:

-xtmixed- will figure out that z1 is a second level variable.

However, your first model I think is beyond -xtmixed-, because
it includes a term of the form u*x1.

hth,
Jeph

SamL wrote:
```
```I've attempted to figure out how to specify a slopes-as-outcomes
multilevel model using _xtmixed- and at this point I am swirling in
confusion.  I have checked statalist and the manual, and cannot find an
example that I am confident matches my aim.  So, if my data has persons
(i) nested within univerities (j), and Model 1, a 2-equation model I seek
to estimate, is:

Y_ij = b0 + b1_j*X1_ij + b2*X2_ij + e_ij
b0 = g00
b1_j = g10 + g11*Z1_j + u1_j
b2 = g20

what would be the appropriate syntax?  And, if Model 2 has a slightly
different specification:

Y_ij = b0_j + b1*X1_ij + b2*X2_ij + e_ij
b0 = g00 + g01*Z1_j + u0_j
b1 = g10
b2 = g20

what would be the appropriate syntax?

I appreciate any assistance you can provide.

Thanks a bunch.
Sam
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

```
```*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```