Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: -mi- & Factor Variables


From   "Alan Taylor" <[email protected]>
To   <[email protected]>
Subject   st: -mi- & Factor Variables
Date   Tue, 11 Aug 2009 17:48:50 +1000

Thanks to help from Yulia, I ran this analysis on an imported imputed dataset in Stata:

mi estimate, cmdok: xtmixed IEStot Group##MQvsComgrps##PTSS_2Grps##time || subject:, variance

I then wanted to test whether the four-way interaction was significant, and tried

mi test Group#MQvsComgrps#PTSS_2Grps#time

This form had worked OK with -xtmixed- with a single dataset (I used mi extract 1 to obtain it).  However, it did not work with -mi- :  

Group#MQvsComgrps#PTSS_2Grps#time not found
r(111);

I found, however, that the full specification of the test did work OK with -mi- :

. mi test 2.Group#2.MQvsComgrps#1.PTSS_2Grps#2.time ///
>  2.Group#2.MQvsComgrps#1.PTSS_2Grps#3.time ///
>  2.Group#2.MQvsComgrps#1.PTSS_2Grps#4.time 
note: assuming equal fractions of missing information

 ( 1)  [IEStot]2.Group#2.MQvsComgrps#1.PTSS_2Grps#2.time = 0
 ( 2)  [IEStot]2.Group#2.MQvsComgrps#1.PTSS_2Grps#3.time = 0
 ( 3)  [IEStot]2.Group#2.MQvsComgrps#1.PTSS_2Grps#4.time = 0

       F(  3,23565.0) =    0.33
            Prob > F =    0.8035

(I checked that this answer was correct by verifying that it was the same as that obtained with -mim- and dummy codes produced by -desmat-.)

This sounds more like a comment than a question, but I suppose my question is whether it is an oversight that

mi test Group#MQvsComgrps#PTSS_2Grps#time

doesn't work.

The error message doesn't suggest that it might be a problem caused by the use of different base categories with different imputed datasets, as mentioned on p. 53 of the MI manual.

Anyway, there's a way of obtaining the desired result, so I'm happy!

Thanks

Alan 



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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