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: rolling correlation help


From   Christopher F Baum <[email protected]>
To   <[email protected]>
Subject   st: re: rolling correlation help
Date   Wed, 16 Feb 2011 17:28:16 -0500

<>
Using clear, as below, seems to remove my data and replace it with the
rolling correlation results.  I want to keep the resulting
correlation, but along with the data already in use.  Does that make
sense?
rolling, window(65) clear: correlate var1 var2



If you use the saving() option on rolling: you will then get a new dataset, and as Nick said, you can merge it back on the original. But you might find it easier in the first place to use -mvcorr- on SSC, by Baum and Cox, which will do the moving correlation in place.

Kit

Kit Baum   |   Boston College Economics and 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index