Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: hascons option with xtmixed?


From   [email protected] (Yulia Marchenko, StataCorp)
To   [email protected]
Subject   Re: st: hascons option with xtmixed?
Date   Tue, 01 May 2007 16:27:47 -0500

Jacki Buros <[email protected]> asks about using the -hascons- option with
-xtmixed-:

> Taking this to the multilevel context, not having the -hascons- option for
> xtmixed is rather clumsy, because I sometimes want to see the group-level
> variance\covariance of y, by using the command
>
> . xtmixed y groupA non_groupA, nocons || id: groupA not_groupA, nocons 
> var cov(uns)
>
> but, using -nocons-, I have 2 model degrees of freedom where I should really
> only have 1.
>

Since -xtmixed- does not allow -hascons- there is no way to obtain the correct
test as a part of the model output.  However, Jacki can obtain the correct
Wald test by using -test- after -xtmixed-.  For the model above, the Wald test
with 1 degree of freedom corresponds to testing the contrast Ho:
coef(groupA)-coef(non_groupA) = 0.

Here is the example:

 . xtmixed y groupA non_groupA, nocons || id: groupA not_groupA, nocons ///
								var cov(uns)
 . test groupA = non_groupA

As for adding this option, this is something that we will look into.


-- Yulia
[email protected]
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index