Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to Convert Nominal GDP to Real GDP


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to Convert Nominal GDP to Real GDP
Date   Fri, 21 Sep 2012 10:10:04 +0100

I think you need to explain where the variables -cpi2001-, -cpi2002-,
etc. come from in your solution.

I guess that you are thinking in terms of subscripts, but writing otherwise.

Perhaps you mean something more like

gen index = 1
replace index = index[_n-1] * (1 + cpi) if _n > 1

Nick

On Fri, Sep 21, 2012 at 9:44 AM, Lovisa Persson
<lovisa.persson@nek.uu.se> wrote:

> Is your variable CPI an index with value 100 or 1 at base year 2000?
>
> In that case you do what Lukas recommended.
>
> If the CPI is in rate of change from year to year,  you first need to
> generate a price index variable with base year 2000 , and THEN you do what
> the previous responder told you.
>
> generate index=1
> replace index=1+cpi if year==2001
>
> and then you impute the rest of the values...
>
> replace index=(cpi2001+1)*(cpi2002+1) if year==2002
> replace index= (cpi2001+1)*(cpi2002+1)* (cpi2003+1) if year==2003
>
> You impute the actual values of the CPI in rate of change...
>
> Now you have an index which you can use to generate your Real GDP variable.
> Using your nominal GDP variable and divide it by the index just as described
> below.

Lukas Borkowski

> the answer would be -gen realgdp = gdp/cpi-

Shawn Meyer:

>> I am new user to Stata. I am requesting if you could teach me something
> which sounds very simple. I have a panel data on GDP of over 100 countries
> for 10 years; from 2000 to 2010 with four variables id, year, GDP and CPI.
> Now I want to generate a new variable REALGDP so that I get real GDP for
> each country (id), with 2000 as the base year. Could you please help me how
> to do it?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index