Conversion from low to high frequency

For questions and discussion related to reading in and working with data.

Conversion from low to high frequency

Postby upasnagaur » Mon Jan 28, 2008 6:07 am

Hi,
Can anyone help me with the conversion procedure from low to high frequency (say annual to quarterly). I cannot figure out the format in which the source file(*.xls) file should be in.

Upasna
upasnagaur
 
Posts: 1
Joined: Thu Jan 24, 2008 10:30 pm

Postby moderator » Mon Jan 28, 2008 10:12 am

The source data file must contain dates that RATS can recognize, so you can use any of the file formats where date information is supported.

For an .XLS file, the dates can either be supplied as labels or as Excel date format numbers, as explained in Chapter 2 of the User's Guide.

If you don't already have a file with dates, an easy way to create it is to read the data into RATS using the appropriate CALENDAR setting, and then write the data out to a new file with the date information included. For example, if you have an XLS file of annual data starting in 1990 which does not include date information, you could do something like:

calendar 1990
allocate 2007:12
open data undated.xls
data(for=xls,org=columns)

* Check the data, including the dates set by CALENDAR:
print

* Write to a new file, with dates:
open copy dated.xls
copy(for=xls,org=col,dates)
close copy

You could then set up a quarterly CALENDAR and read the data back in from the "dated" file to convert the data to quarterly series. You may then want to apply the DISTRIB or INTERPOL procedure (included with RATS) to interpolate the data.

Regards,
Tom Maycock
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 1 guest

cron