Splicing Old and Revised Data

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

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

Splicing Old and Revised Data

Postby Dominator » Thu May 29, 2014 6:01 am

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

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

Re: Splicing Old and Revised Data

Postby EViews Glenn » Thu May 29, 2014 12:17 pm

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 2030
smpl 1950 2010
series a=@trend + rnd  'history to splice into y
smpl 1990 2030
series 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: 339
Joined: Fri Apr 15, 2011 5:35 am

Re: Splicing Old and Revised Data

Postby tvonbrasch » Fri May 11, 2018 4:59 am

Hi

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

Code: Select all

copy(m, splice) a b


Thomas


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests