overlay two series

For questions regarding programming in the EViews programming language.

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

Krzysztof
Posts: 15
Joined: Mon Jan 11, 2010 3:53 am

overlay two series

Postby Krzysztof » Mon Jan 11, 2010 4:36 am

Does anyone know how to easily overlay two series?

I would apprecaite any help.

Rgds, Krzysztof

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: overlay two series

Postby EViews Gareth » Mon Jan 11, 2010 8:05 am

You'll have to be more precise as to what you mean by that.

Krzysztof
Posts: 15
Joined: Mon Jan 11, 2010 3:53 am

Re: overlay two series

Postby Krzysztof » Tue Jan 12, 2010 2:30 am

Sure, nor problem, below there is a hypothetical example:
Assume that the annual time series A has the values 1, 2, NC, and 4 for the years 1987 to 1990 and that the annual series B has the values NA, 6, 7, and 8 for the same period.

I would like to have a function (or find any way) which would return the series 1, 2, 7 and 4. > series B overlaid with series A
I would be desirable that the solution works both ways to return the series 1, 6, 7 and 8. > series A overlaid with series B

Many thanks in advance, k

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: overlay two series

Postby EViews Gareth » Tue Jan 12, 2010 8:09 am

You can use the @recode function for this:

Code: Select all

series c = @recode(a=na,b,a)
or

Code: Select all

series c = @recode(b=na,a,b)

Krzysztof
Posts: 15
Joined: Mon Jan 11, 2010 3:53 am

Re: overlay two series

Postby Krzysztof » Tue Jan 12, 2010 11:02 am

works perfectly, many thanks


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests