Hi all!
I'd like to convert a quarterly time series (GDP) into a monthly one. But in a specific way:
I'd like to do something like:
2000:01 NA
2000:02 NA
2000:03 Value
2000:04 NA
2000:05 NA
2000:06 Value
...
Anyone have any idea how to procede this?! I can use the EV conversion methods, but I don't want one. Actually, I'd like to build a Kalman filter to link GDP with monthly indicators. Thanks in advance, Fabio.
Frequency Conversion - Help
Moderators: EViews Gareth, EViews Moderator
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: Frequency Conversion - Help
This is one of those conversions that I've wanted to make one of our automatic ones, but it's never advanced beyond a request. Having said that, it's not too hard to do semi-manually.
What you can do is to use the built-in repeated value conversion (by value), then to set the sample to exclude all but the quarter endpoints in the monthly file and NA out the values.
Once you do that, you should be able to set up the sspace object to do your Kalman filtering without too much trouble.
What you can do is to use the built-in repeated value conversion (by value), then to set the sample to exclude all but the quarter endpoints in the monthly file and NA out the values.
Once you do that, you should be able to set up the sspace object to do your Kalman filtering without too much trouble.
Re: Frequency Conversion - Help
Tks Glenn.
Usually I do it manually, indeed. But I'd like to optimize/programming to do that not only to one variable, but to 16. And they are revised quarterly. Anyway, tks for the tip about conversion and excluding points. It was useful. Fabio.
Usually I do it manually, indeed. But I'd like to optimize/programming to do that not only to one variable, but to 16. And they are revised quarterly. Anyway, tks for the tip about conversion and excluding points. It was useful. Fabio.
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: Frequency Conversion - Help
If you're doing it a lot, I'd wrap it in a subroutine then you should be good to go.
Re: Frequency Conversion - Help
Is it possible to post some example how to convert quarterly data to monthly with indicators by kalman filter.
Re: Frequency Conversion - Help
Its a simple thing (i think it'll work):
Be:
yqi quarterly data, but exposed monthly: jan=NA, feb=NA, mar=number, abr=NA, may=NA, jun=number,...
ym the monthly indicator, available for any month.
What I've done is to get an estimate of the quarterly data by three months moving average of monthly data.
The sspace could be something like:
@signal yq=(yq0+yq1+yq2)/3
@state yq0=c(1)+c(2)*ym+[var=exp(c(3))]
@state yq1=yq0(-1)
@state yq2=yq1(-1)
You can manipulate: in the example, the ym can be converted by a random walk with a drift if c(2)=1. Or only a RW if c(1)=0 and c(2)=1. U can use 'param' command to set up initial conditions (its useful).
Other alternative is the use of some matlab routines (as td- temporal disaggregation) or Eurostat Ecotrim. Even Stamp (OxMetrics) can be useful to convert your data. I think they are better to your problem (nowadays I'm being successful with matlab + ev).
Fabio/S. Paulo/Brazil
Be:
yqi quarterly data, but exposed monthly: jan=NA, feb=NA, mar=number, abr=NA, may=NA, jun=number,...
ym the monthly indicator, available for any month.
What I've done is to get an estimate of the quarterly data by three months moving average of monthly data.
The sspace could be something like:
@signal yq=(yq0+yq1+yq2)/3
@state yq0=c(1)+c(2)*ym+[var=exp(c(3))]
@state yq1=yq0(-1)
@state yq2=yq1(-1)
You can manipulate: in the example, the ym can be converted by a random walk with a drift if c(2)=1. Or only a RW if c(1)=0 and c(2)=1. U can use 'param' command to set up initial conditions (its useful).
Other alternative is the use of some matlab routines (as td- temporal disaggregation) or Eurostat Ecotrim. Even Stamp (OxMetrics) can be useful to convert your data. I think they are better to your problem (nowadays I'm being successful with matlab + ev).
Fabio/S. Paulo/Brazil
Return to “Suggestions and Requests”
Who is online
Users browsing this forum: No registered users and 32 guests