Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: residuals after xtmixed


From   [email protected]
To   [email protected]
Subject   Re: st: residuals after xtmixed
Date   Tue, 4 Dec 2012 09:15:15 +0000

Hello Tom,

After checking the -help xtmixed postestimation-, I saw that:

-predict fit- is the linear predictor for the fixed portion of the model

-predict res, residuals- is the response minus the fitted, where the 
fitted value is the linear predictor of the fixed portion plus 
contributions based on predicted random effects

So your Y minus fit is not calculating the same thing as res.

I hope this helps,

Gillian



From:   Thomas Norris <[email protected]>
To:     "[email protected]" <[email protected]>
Date:   03/12/2012 17:33
Subject:        st: residuals after xtmixed
Sent by:        [email protected]



Dear statalist,

I have ran the commands:

?xtmixed y x_1 x_2|| studyid: x_1 x_2, cov(unstructured)mle?

?predict fit?

?predict res, residuals?

And the first participant's data is below

y                            x_1                        x_2         fit    
                res                         b1                          b2 
                             b3 
8.188689             .72068154           5.1019341           8.04669   
.0442446             .0689545             -.0061089             .0792279   
 


Can anyone explain why: ?Y? minus ?fit?  does not equal ?res? though?  Ie. 
8.188689-8.04669= 0.14199 (not 0.0442446)?

Many thanks,

Tom 

Tom Norris (PhD student)
Centre of Global Health and Human Development
School of Sport, Exercise and Health Sciences
Loughborough University
Loughborough
LE11 3TU


Tom Norris (PhD student)
Centre of Global Health and Human Development
School of Sport, Exercise and Health Sciences
Loughborough University
Loughborough
LE11 3TU


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential information intended
for the addressee(s) only. If this message was sent to you in error,
you must not disseminate, copy or take any action in reliance on it and
we request that you notify the sender immediately by return email.

Opinions expressed in this message and any attachments are not
necessarily those held by the Health and Safety Laboratory or any person
connected with the organisation, save those by whom the opinions were
expressed.

Please note that any messages sent or received by the Health and Safety
Laboratory email system may be monitored and stored in an information
retrieval system.
------------------------------------------------------------------------
Think before you print - do you really need to print this email?
------------------------------------------------------------------------

------------------------------------------------------------------------
Scanned by MailMarshal - Marshal's comprehensive email content security
solution. Download a free evaluation of MailMarshal at www.marshal.com
------------------------------------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index