Frequency Conversion - Help

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

fmramos
Posts: 113
Joined: Fri Sep 19, 2008 7:30 am
Location: Sao Paulo / Brazil
Contact:

Frequency Conversion - Help

Postby fmramos » Tue May 12, 2009 6:25 am

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.

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Frequency Conversion - Help

Postby EViews Glenn » Tue May 12, 2009 6:58 am

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.

fmramos
Posts: 113
Joined: Fri Sep 19, 2008 7:30 am
Location: Sao Paulo / Brazil
Contact:

Re: Frequency Conversion - Help

Postby fmramos » Tue May 12, 2009 7:24 am

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.

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Frequency Conversion - Help

Postby EViews Glenn » Tue May 12, 2009 10:14 am

If you're doing it a lot, I'd wrap it in a subroutine then you should be good to go.

jkosti
Posts: 1
Joined: Tue May 18, 2010 12:48 am

Re: Frequency Conversion - Help

Postby jkosti » Tue May 18, 2010 3:04 am

Is it possible to post some example how to convert quarterly data to monthly with indicators by kalman filter.

fmramos
Posts: 113
Joined: Fri Sep 19, 2008 7:30 am
Location: Sao Paulo / Brazil
Contact:

Re: Frequency Conversion - Help

Postby fmramos » Thu May 20, 2010 7:55 pm

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


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 32 guests