## Splicing Old and Revised Data

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

Dominator
Posts: 10
Joined: Fri May 23, 2014 4:54 am

### Splicing Old and Revised Data

Is there an Eviews command that performs the same function as the Aremos splice command?

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

### Re: Splicing Old and Revised Data

There's not a specific function (we should add one), but you can easily perform the same operation using existing EViews commands.

Here's an example program which makes data to be spliced.

Code: Select all

`create q 1950 2030smpl 1950 2010series a=@trend + rnd  'history to splice into ysmpl 1990 2030series b=.4*a+nrnd  smpl @all`

A is the original data. B are the revisions. Here's the line to do the splicing of B onto A with rescaling of A when B isn't available. This splice uses the ratio of the means for the overlapping data to do the rescaling. You can choose your own scaling factor.

Code: Select all

`series y = @iif(b<>na, b, @mean(b, "if a<>na and b<>na") / @mean(a, "if a<>na and b<>na") * a)`

The line looks to see whether B has NAs. If not, then it uses B. Otherwise, it scales the original A by the means of the overlapping data.
You can then look at the historial, revision, and spliced data to see what you've done.

Code: Select all

`show y a b`

tvonbrasch
Posts: 376
Joined: Fri Apr 15, 2011 5:35 am

### Re: Splicing Old and Revised Data

Hi

This should be built in as an option in the copy command, say

Code: Select all

`copy(m, splice) a b`

Thomas