Hi,

I have cross-sectional data covering 5 different years. Using the last year, 2011 as the base year, I re-adjusted all the CPI values. However, I facing difficulty in using these adjusted CPI values to convert nomial marginal propensity to consume to real terms. I have tried something like this but I don't know if this is correct or not:

Code:
gen realmpce = cond(year==1983, mpce*(21.41623/100), mpce) if urban == 0

Example of data:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(CPI_Adjusted mpce year) byte urban
 24.23569   80.86 1983 0
 24.23569   69.98 1983 0
 24.23569   62.89 1983 0
 24.23569   74.44 1983 0
 24.23569   63.76 1983 0
28.015564  142.88 1987 0
28.015564  308.47 1987 0
28.015564  108.23 1987 0
  24.4099  271.25 1987 1
28.015564  143.25 1987 0
  24.4099  187.75 1987 1
31.906614  458.61 1993 0
31.906614  202.75 1993 0
31.906614  240.76 1993 0
31.906614  108.85 1993 0
31.906614   123.5 1993 0
31.906614  356.44 1993 0
 55.58644   560.5 2004 0
 57.57052  527.62 2004 1
 55.58644  468.25 2004 0
 55.58644  316.73 2004 0
 55.58644   845.4 2004 0
 55.58644  1138.5 2004 0
 55.58644   352.8 2004 0
      100  1510.6 2011 0
      100  893.33 2011 0
      100    4139 2011 0
      100 1523.75 2011 0
      100 1563.67 2011 1
      100    6514 2011 1
end
label values urban urban
label def urban 0 "0 Rural", modify
label def urban 1 "1 Urban", modify