Announcement

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

  • HP filter

    Hello!

    I am a new user in Stata and I am struggling with this situation.

    I have panel data. I want to do the following:

    -The log difference of HP filtered output in T and T-1
    -The log difference of HP filtered output in (T and T+1)-(T-1)

    I hope you can help me with the commands.

  • #2
    Something like this;

    Code:
    xtset panelvar timevar
    
    gen variable = log(hpgdp) - log(l.hpgdp)
    these second I did not undersand what you want, but you can use lead (f.) and lag (l.) operators as above. there is also l2.var which is two lags, and f2.var which is two leads etc.

    Comment


    • #3
      Cross-posted at https://stackoverflow.com/questions/...ilter-in-stata

      Comment


      • #4
        Basically, I am trying to measure the output change based on trend filtered output.
        And to get to hpgdp? Just need to do the deviation of output from its trend?

        Comment


        • #5
          Not clear what you want to do for me. As far as i understood, you detrended the gdp using the hp filter. Am i right? If so the resulting variable is the business cycle of the economy (output - trend). Why do you want to calculate the growth rate?

          Comment

          Working...
          X