Announcement

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

  • Issue with Autocorrelation command

    Hi Everyone!

    I am new to state and using this forum. I am trying to perform time series analysis for Bostwana covering a 25 year time period for one country. The original dataset has no gaps but after using the following command:

    prais lgdp ltrade lpopg lfdi lpopd, corc

    to control for autocorrelation, I lose 1 observation and create a gap in my time series. Should I be concerned about the one time period lost? is there another way to deal with issue of autocorrelation without losing an observation?

    Thanks
    Rose

  • #2
    The reason you lose an observation is because you include the option -corc- in the command, specifying that the Cochrane-Orcutt transformation be used to estimate the equation. The default is the AR(1) method which tends to produce the same coefficient as Cochrane-Orcutt, but smaller standard errors and is recommended over applying the transformation.

    Code:
    prais lgdp ltrade lpopg lfdi lpopd
    Alternatively, beause serial correlation does not cause bias in the estimated coefficients but impacts on the standard errors, then it makes sense to adjust the estimated equation in a way that changes the standard errors but not the coefficients. This is the logic of Newey-West standard errors. See

    Code:
    help newey

    ps. Read "state" as "Stata" in #1

    Comment


    • #3
      Dear Andrew,

      Thank you so much for you help. Regarding the use of newey, how do I determine the appropriate number of lags to apply not just for executing by use of newey but as a general rule, say if I wanted to use the VAR model for example.

      Comment


      • #4
        For newey, there are several rules of thumb. For example, in Greene's textbook, the maximum lag order of autocorrelation is given as

        $$m= int\left(T^{\frac{1}{4}}\right)$$

        where \(int(x)\) refers to the the integer obtained by truncating x toward 0. For example, if T=50,

        Code:
        di "m = `=int(`=50^(1/4)')'"
        Res.
        Code:
        . di "m = `=int(`=50^(1/4)')'"
        m = 2
        Stock and Watson, on the other hand suggest the rule of thumb

        $$m= int\left(0.75*T^{\frac{1}{3}}\right)$$

        So with T=50,

        Code:
        di "m = `=int(0.75*`=50^(1/3)')'"
        Res.:
        Code:
        . di "m = `=int(0.75*`=50^(1/3)')'"
        m = 2
        For vector autoregression models, there is a large literature on lag selection, please consult textbooks on time-series econometrics. If I recall well, some software packages like Eviews are able to do this automatically, but I do not think that Stata has this capability currently.

        References:
        Greene, W H. (2018). Econometric Analysis, 8th edition.
        Stock H J. and Watson M. W. (2017). Introduction to Econometrics, 3rd Edition.
        Last edited by Andrew Musau; 19 May 2020, 07:58.

        Comment


        • #5
          Thanks Andrew

          Comment

          Working...
          X