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]

st: RE: RE: creating AR(1) correlation matrix


From   "Lachenbruch, Peter" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: RE: creating AR(1) correlation matrix
Date   Thu, 16 May 2013 16:01:07 +0000

I need to generate the correlation matrix for input to drawnorm, so this isn't quite what i need.  Thanks for the help

Peter A. Lachenbruch,
Professor (retired)
________________________________________
From: [email protected] [[email protected]] on behalf of Jacobs, David [[email protected]]
Sent: Thursday, May 16, 2013 8:13 AM
To: '[email protected]'
Subject: st: RE: creating AR(1) correlation matrix

A quick and maybe dirty way to do this is to run a population averaged, panel regression model with an AR1 term if that's appropriate.

Then type -xtcorr- (there's a newer command but xtcorr still works at least in version 11).  You'll probably get the correlation matrix used to compute the AR1 correction.  I say probably because the matrix you want may be too large for this option.

Dave Jacobs

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lachenbruch, Peter
Sent: Thursday, May 16, 2013 10:59 AM
To: [email protected]
Subject: st: creating AR(1) correlation matrix

I need to create a correlatoin matrix of rho^(i-j) where i and j are row and column indexes.  Is there a simple command in Stata that will do htis?  I can do it in a foreach loop (although i've been messing it up so far).  This is for a simulation and the dimension of the correlation is 50 or 100 so i don't want to do it manually.


Peter A. Lachenbruch,
Professor (retired)
*
*   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/

*
*   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/
*
*   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