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: Corrgram does not give the same result as coefficient of determination


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Corrgram does not give the same result as coefficient of determination
Date   Mon, 15 Oct 2012 13:32:55 +0100

Quite so.

-corrgram- does _not_ use the Pearson correlation between a variable
and itself lagged, which would lead to divisors of (sample size - lag)
in variance-like terms (and their square roots in  SD-like terms).
What it does is documented at [TS] corrgram p.107 in Stata 12 version,
which is to neglect lag altogether.

The reasons for this estimator are discussed at length in any
substantial time series text, and centre largely on ensuring credible
estimates of the variance spectrum. Even though frequency domain work
is perhaps unusual among Stata users, this estimate is nevertheless
conventional in time series analysis.

Note the convention on Statalist that you are using Stata 12 unless
otherwise declared, and a consequence of that is that you can look at
the manual on-line to see this for yourself.

Nick

On Mon, Oct 15, 2012 at 12:50 AM, Dr. Yu Chen <[email protected]> wrote:

> I wanted to get the autocorrelation coefficient, and I found that
> corrgram did not give the same result as given by an OLS regression.
> For example, if I regress x(t) on x(t-1) and obtained the r-squared
> from the reg command, the square root of the r-sqaure is not the same
> as that given by corrgram (or ac). I also used the formula to
> calculate the autocorrelation, and the result did not agree with
> corrgram (but agreed with the regression method). I used this formula:
> Cov(xt, xt-1)/sqrt(Var(xt)*Var(xt-1)).
> What is the reason for this discrepancy?
> Thank you very much for any insights you may have.
*
*   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