Splicing Old and Revised Data
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
Splicing Old and Revised Data
Is there an Eviews command that performs the same function as the Aremos splice command?
-
- EViews Developer
- Posts: 2671
- 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.
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.
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.
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
-
- Posts: 540
- 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
Thomas
This should be built in as an option in the copy command, say
Code: Select all
copy(m, splice) a b
Thomas
Who is online
Users browsing this forum: No registered users and 9 guests