Announcement

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

  • remove "inflation" without inflation data?

    say I have a signal, which includes some form of inflationary price, but I don't know the inflation rate other than it's "quite likely linear" (by observation only), is there a better way to remove this inflation than the script below:

    Code:
    clear
    set obs 1000
    gen signal=_n*0.01+runiform()
    gen date=_n+14610
    format %td date
    tsset date
    regress signal date
    gen signalwithoutinflation=signal-(date*_b[date])+_b[_cons]
    tsline signalwithoutinflation
    Let me know if this makes sense.

  • #2
    It seems to me you just want to
    Code:
    predict signalwithoutinflation, residual
    or perhaps either
    Code:
    predict signalwithoutinflation, residual
    replace signalwithoutinflation = signalwithoutinflation+_b[date]*date[1]
    ​​​​​​​
    to deflate everything back to the equivalent of the first date, or
    Code:
    predict signalwithoutinflation, residual
    ​​​​​​​replace signalwithoutinflation = signalwithoutinflation+_b[date]*date[_N]
    ​​​​​​​
    to inflate everything forward to the equivalent of the last date.

    Comment


    • #3
      yeah that makes sense.

      Comment

      Working...
      X