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]

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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 <profyuchen@gmail.com> 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/

**References**:**st: Corrgram does not give the same result as coefficient of determination***From:*"Dr. Yu Chen" <profyuchen@gmail.com>

- Prev by Date:
**Re: st: whether difference is significant** - Next by Date:
**st: whether difference is significant** - Previous by thread:
**st: Corrgram does not give the same result as coefficient of determination** - Next by thread:
**st: Abnormal logistic results** - Index(es):