Page 1 of 1

Merging series

Posted: Tue Mar 03, 2015 6:21 am
by CatarinaSilva
Hi,

Could someone tell me why this is not working?

v_consumption+(in_consumption/in_consumption(-4)-1)*100

I want to merge the series "v_consumption" (with one has values until 1995) and the series that results from the computation of the growth rate of "in_consumption" (which only has values after 1995).

Thanks!

Re: Merging series

Posted: Tue Mar 03, 2015 7:24 am
by trubador
It would be much easier if you shared the workfile or provided more details:
1) You are computing the percent growth, but then trying to "add" it.
2) Series do not intersect. At least one common point is needed. In your case, you need four.
3) You should adjust the sample accordingly.

Assuming you have quarterly data and both series have values throught 1995q1:1995q4, the following should work:

Code: Select all

smpl 1996q1 @last v_consumption = v_consumption(-4)*(in_consumption/in_consumption(-4)) smpl @all
or simply:

Code: Select all

v_consumption = @recode(v_consumption=NA,v_consumption(-4)*(in_consumption/in_consumption(-4)),v_consumption)