Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

re: st: Cholesky decomposition of residuals covariance matrix after xtmixed


From   Christopher Baum <kit.baum@bc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   re: st: Cholesky decomposition of residuals covariance matrix after xtmixed
Date   Sun, 5 Dec 2010 08:47:34 -0500

<>

I presume the 'matrix of residuals' is the set of residuals by week, as that has full rank.

 webuse pig, clear
 xtmixed weight week || id:
 predict double e, res
 drop weight
 reshape wide e, i(id) j(week)
// tomata from ssc 
 tomata e1-e9
 mata: st_matrix("cholesky", cholesky(variance((e1,e2,e3,e4,e5,e6,e7,e8,e9))))
 mat list cholesky


Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index