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]

st: correlate lag variables


From   Julia <j.statalist@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: correlate lag variables
Date   Mon, 10 May 2010 10:16:35 +0200

Dear all,

I would like to calculate the correlation between a variable and its
past values. Thus, I use the following command:

. correlate BI L1.BI L2.BI
(obs=225)

             |           L.      L2.
             | BI       BI      BI
-------------+---------------------------
          BI|
         --. |   1.0000
         L1. |   0.0111   1.0000
         L2. |   0.0647   0.0161   1.0000


However, if I only ask the correlation for the first lag, my result differs....

. correlate BI L1.BI
(obs=265)

             |             L.
             |    BI     BI
-------------+------------------
          BI|
         --. |   1.0000
         L1. |   0.0174   1.0000

 Why does excluding the second lag affect the correlation between the
variable and its first lag?

Best regards,

Julia

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