Replicate Series Creation from Excel

For questions regarding programming in the EViews programming language.

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

dreavis
Posts: 10
Joined: Fri Nov 15, 2013 3:52 pm

Replicate Series Creation from Excel

Postby dreavis » Thu Jun 19, 2014 6:04 am

I am migrating all data creation out of Excel and into Eviews, for increased speed and accuracy. Now, instead of copying and pasting from IHS data downloaded from the IHS site to a series of spreadsheets, I am extracting the series right out of the databanks as needed. (I love that!)

I have reached a point that I don't know how to reproduce what has been done in Excel... I need to create a new series from an existing series calculated in Eviews, where the new series observations are equal to the existing series through 2013q4, then 2014q1,2014q2,2014q3,and 2014q4 are equal to 2013q4. Then 2015q1,2015q2,2015q3,and 2015q4 are equal to 2014q4. And finally, 2016q1,2016q2,2016q3,and 2016q4 are equal to 2015q4. I am attaching a mock-up to help visualize what I need to do.

Thanks in advance to anyone who can help me. I really appeciate it. :)
Attachments
6-19-2014 8-48-51 AM.png
visual example of what I need to do
6-19-2014 8-48-51 AM.png (14.24 KiB) Viewed 4757 times

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

Re: Replicate Series Creation from Excel

Postby EViews Gareth » Thu Jun 19, 2014 8:15 am

Needs a few lines of code:

Code: Select all

smpl 2010 2013 series y2 = y smpl 2014 @last y2 = @recode(@quarter=1, y(-1), y2(-1)) smpl @all
Where Y is the original series, Y2 is the new one.

dreavis
Posts: 10
Joined: Fri Nov 15, 2013 3:52 pm

Re: Replicate Series Creation from Excel

Postby dreavis » Thu Jun 19, 2014 10:41 am

Thank you very, very much! :D


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests