Announcement

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

  • Rolling growth rate in panel data

    Hi
    I have a panel data set with T=30 and N=15
    I want to calculate rolling growth rate for 5 years

    I know that growth rate can be calculated using the following two options as mentioned in previous posts (for example https://www.stata.com/statalist/arch.../msg00664.html)
    Code:
     by id: g growth=(gdp[_n]-gdp[_n-1])/gdp[_n-1]  
     ​​​​Or  
      D.(loggdp) (which is more like change
    I am not sure how to adjust both the above for the rolling window. Any suggestions will be appreciated Thanks
    Last edited by Jaweriah Abdullah; 05 Aug 2019, 05:45.

  • #2
    I think Nick Cox already answered this question (https://www.statalist.org/forums/for...using-rangerun)
    ​(probably need to work on my key word proficiency)
    however can the same be done using the prefix d.

    Comment

    Working...
    X