Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autocorrelation

    Dear all,

    I want to estimate an AR. I do so via the following commands:
    ac pricedifference, lags(6) generate (ac)/*autocorrelation function*/

    foreach n of numlist 1/6{
    disp ac[`n']

    How can I know how many lags to include? Is it just looking at the grey area from the ac graph, and only include the lags for which the points do not lie in the grey area?


    Click image for larger version

Name:	Schermafbeelding 2022-12-18 115403.png
Views:	1
Size:	45.7 KB
ID:	1694003


  • #2
    Depends on the series -- and on what you expect about trend, seasonality and other sources of variation.

    For example, if your data were monthly, look at enough lags (say 24) to check for seasonality; the same kind of comment might apply to any other time resolution.

    Some series have autocorrelations that damp to zero very quickly. Autocorrelations for series that shows long-term trend won't damp at all, and you should model the data to remove, or preferably account for, the trend.

    Comment


    • #3
      Another way is to look at the previous literature, and see how previous published papers have handled the type of data you are dealing with.

      Comment

      Working...
      X