Announcement

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

  • Time series filter

    Hi everyone

    I am working on a time series data and from the data had to calculate the output gap.
    I have used BK filter for that and calculated the trend as well. I am however not getting all the values and there are missing observations at the starting and the end.

    Stata version is 12.0. Pls help me with the commands. It is a quaterly data.

    tsfilter bk bk_gdp= ln_gdp,min(6) max(32) sma(12)
    tsfilter bk trend_gdp=ln_gdp,min(6) max(32) trend(trend_bk)
    tsline trend_bk ln_gdp

    This is what I have used.

    Thank you

  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    I'm unable to help you with your substantive problem. Just a guess, but it may be that the filter is using multiple lags of the iv in which case it will not be able to make predictions at the beginning of the sample. I don't have any guesses about missing at the end. Try reposting with the additional information and see if you get a response.

    Comment

    Working...
    X