Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: adjust to the inflation level


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: adjust to the inflation level
Date   Fri, 4 Feb 2011 14:41:30 +0000

You've got to do this

bysort country id (year): 

or so I imagine. 

Nick 
[email protected] 

Daniel Feenberg

On Fri, 4 Feb 2011, Tharshini Thangavelu wrote:

> Dear statlist,
>
> I have a question concerning how to adjust my variable "return on asset"
> (RoA) to inflation using consumer price index (cpi).
>
> My dataset is a time serie, I have generated id and told to STATA that it
> deals with a time serie. The variable RoA goes from year 1998-2010 a cross
> countires and companies. The cpi goes from year 1998-2010 with year 2006 as
> the base year.
>
>
> year        RoA          cpi     id   country
> 98         11.114         87     1     sweden
> 99         4.902          88     1     sweden
> 00         4.669          90     1     sweden
> 01         6.603           .     1     sweden
> 02        -.005           92     1     sweden
> 03        3.064           94     1     sweden
> 04        -25.963         95     1     sweden
> 05         25.699         97     1     sweden
> 06           0            100    1     sweden
> 07           0            102    1     sweden
> 08           0            104    1     sweden
> 09           0            108    1     sweden
>
> My question is the following: I would like to adjust the RoA to the year
> 2009 price level. How do I do this?

Lagged cpi is indicated by cpi[_n-1]. So real RoA is

   gen real_roa = roa-100*(cpi-cpi[_n-1])/cpi[_n-1]

This assumes the CPI is measured at end of year.

The base year is irrelevant - the real RoA is just the nominal RoA less 
the rate of inflation. Not that changing the base year would move cpi and 
cpi[_n-1] in the same proportion, and would not affect real_roa.

Note that "help lag" doesn't produce any result.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index