Creating a Constant using a calculation

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

ussurveys
Posts: 2
Joined: Mon Feb 23, 2009 2:55 pm

Creating a Constant using a calculation

Postby ussurveys » Mon Feb 23, 2009 3:15 pm

Hello,
I need to create a PRG where a calculation becomes a constant for later calculations. I am specifically trying to take an annual 2007 figure and repeat it monthly for January 2007 to June 2009. The annual 2007 figure is the share of manufacturing in GDP based off of the BEA's GDP By Industry data. Does anyone know how to repeat this figure without just figuring it out in Excel and typing it into Eviews?
Thanks!

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

Re: Creating a Constant using a calculation

Postby EViews Gareth » Mon Feb 23, 2009 5:14 pm

It really isn't clear from your post exactly what you are trying to do.

I think you are saying that you have an annual workfile page with a value for 2007. You also have a second workfile page (I'll assume in the same workfile) that is monthly. You would like to set the months 2007:1 to 2009:6 equal to that value from the annual page. And I believe you wish to do this in a program. If so, it is quite simple:

Assuming that your annual page is called "annual" and your quarterly page is called "quarterly", and that the series is called "GDP" in both pages:

Code: Select all

pageselect annual !value = @elem(GDP,"2007") pageselect quarterly smpl 2007:1 2009:6 GDP = !value
done!

ussurveys
Posts: 2
Joined: Mon Feb 23, 2009 2:55 pm

Re: Creating a Constant using a calculation

Postby ussurveys » Tue Feb 24, 2009 7:50 am

Thank you!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests