Combining two data series into one
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Combining two data series into one
Hi,
I'd like to sue the growth rates of one data series that has ended and use those growth rates to extend another data series that replaced it bacx in time. Anyone know a quick and easy way to program that?
I'd like to sue the growth rates of one data series that has ended and use those growth rates to extend another data series that replaced it bacx in time. Anyone know a quick and easy way to program that?
Re: Combining two data series into one
Yes, you can quickly and easily do it with adjusting the sample period. You may also find @recode function very useful.
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
So I have the sample period covering both data sets. For example series 1 is from 1990 to 2000 and series 2 is form 2000 to now. How would I extend series 2 back to 1990 using those growth rates? It's easy in excel but I'm not sure how to do it in eviews. thanks
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
Thanks. I think that link shows how to extend a series forward using the growth rates of a new series. Please tell me if I'm wrong.
I'm looking to extend a series backward with the growth rates of an old series.
I'm looking to extend a series backward with the growth rates of an old series.
Re: Combining two data series into one
It is really quite straightforward to do that in reverse. Since you can do it in Excel, you already know how to formulate it.
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
I understand the logic in reversing it to go backward, but when i tried only one data point was added to the sereis and the rest are still NAs :?
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
I am able to make a spliced series of the growth rates of one variable and then the growth rates of the second variable. Now I just need to know how to create a level series using the last data point and "growing" backward.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Combining two data series into one
Might want to check my arithmetic, but the idea is sound:
Code: Select all
'make some data
create a 1990 2015
smpl 1990 2000
series x1=nrnd
smpl 2000 2015
series x2=nrnd
'calculate growth rates
smpl 1990 2000
series growth = (x1-x1(-1))/x1(-1)
'calculate x2 in the past
smpl 1990 1999
genr(r) x2 = x2(1)/(growth(1)+1)
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
Hi Gareth,
That's essentially what I've been trying but it seems to only create one observation. It creates the observation reight before the start of the newer series and leaves everything else blank.
That's essentially what I've been trying but it seems to only create one observation. It creates the observation reight before the start of the newer series and leaves everything else blank.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Combining two data series into one
Which version of EViews?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Combining two data series into one
Make sure it is fully up to date. Also make sure you copied my code exactly.
-
miorinnovo
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Combining two data series into one
It worked! thank you again! (I had tried to create a new variable rather than extend the x2)
Re: Combining two data series into one
How would the code change in EViews 11?
Who is online
Users browsing this forum: No registered users and 2 guests
