Simple (?) data combination

For questions and discussion related to reading in and working with data.
Lars85
Posts: 2
Joined: Mon Mar 02, 2015 8:57 am

Simple (?) data combination

Unread post by Lars85 »

Hello, i am new to this forum and i hope not to waste somebody's time here, but i cant' figure out to manage the following (eventhough i have searched the forum and manual etc.):

I want to construct a VAR using long as possible time series. I have two time series on the WorldGDP. One series "A" (from Madission Database) starts in 1900 and ends in 2008. The other one "B" is from the OECD covering the years 1959 to 2014. After seperate transformations (diff and log) i want to "combine" these two series, or rather i want to construct a series in RATS which combines the values of "logdiff A" from 1901-2008 and the values of "logdiff B" for 2009-2014.

Of course that can be done by manipulating the data in the sources files, but is there a way to do this in RATS?

Thank you in advance.
Lars
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Simple (?) data combination

Unread post by TomDoan »

You can splice the data with something like:

set splicedGDP = %if(t>=2009:1,logdiffB,logdiffA)
Lars85
Posts: 2
Joined: Mon Mar 02, 2015 8:57 am

Re: Simple (?) data combination

Unread post by Lars85 »

That was easy, thank you!
Post Reply