Dear Statalisters,
I'm trying to run an HP filter on a few time series and I keep getting an error when Stata tries to generate the new variables. I've tried different specifications of the command but nothing seems to work.
So, suppose I have yearly observations on a number of companies and 3 (existing) time series variables, var1 var2 var3. I've declared my dataset as being a panel, using xtset.
I want to run an HP filter on all 3 series, and save both the cyclical and the trend component as new variables. Also, I need to change the smoothing parameter to 100, say.
What's the correct syntax for this? I tried different specifications and I keep getting a "variable xxxx not found" error, where xxxx should be the name of the first NEW variable that Stata itself should generate when filtering the existing series - that is, the first element of "newvarlist" in the documentation: http://www.stata.com/manuals13/tstsfilterhp.pdf
Thank you very much for your help
I'm trying to run an HP filter on a few time series and I keep getting an error when Stata tries to generate the new variables. I've tried different specifications of the command but nothing seems to work.
So, suppose I have yearly observations on a number of companies and 3 (existing) time series variables, var1 var2 var3. I've declared my dataset as being a panel, using xtset.
I want to run an HP filter on all 3 series, and save both the cyclical and the trend component as new variables. Also, I need to change the smoothing parameter to 100, say.
What's the correct syntax for this? I tried different specifications and I keep getting a "variable xxxx not found" error, where xxxx should be the name of the first NEW variable that Stata itself should generate when filtering the existing series - that is, the first element of "newvarlist" in the documentation: http://www.stata.com/manuals13/tstsfilterhp.pdf
Thank you very much for your help
Comment