IndEcol / pymrio

Multi-Regional Input-Output Analysis in Python.
http://pymrio.readthedocs.io/en/latest/
Other
161 stars 71 forks source link

Final demand used in computing exio3.satellite.D_cba_reg #61

Closed mariondumas closed 3 years ago

mariondumas commented 3 years ago

Hello, I want to benchmark the results I get for consumption-based emissions using household expenditure data against exio3.satellite.D_cba_reg. I am not sure what vector you use as final demand in this calculation? I tried reproducing the output of exio3.satellite.D_cba_reg for particular regions by calculating a vector of final demand from the Y matrix, but the results are not congruent.

Specifically, suppose I want to compute cba for FR for total final demand (both imported and domestically satisfied): Y_ini_df = exio3.Y.loc[:,'FR'] Y_ini_df.loc[:,'Final consumption'] = [sum(x[0:3]) for x in Y_ini_df.values.tolist()] # summing household, NGO and gov final consumption Y_ini_df = Y_ini_df['Final consumption'] Y_final = pd.DataFrame(np.zeros([49,200]),index = Y_ini_df.unstack().index,columns=Y_ini_df.unstack().columns) Y_final.loc['FR'] = Y_ini_df.unstack().sum(axis=0) Y_final = Y_final.stack() # this final demand vector has dim 9800x1. It only contains the final demand for France and is 0 everywhere else. CBA = np.matmul(M,Y_final)

The results are about roughly twice as large as the output of exio3.satellite.D_cba_reg.loc['FR'] (so the problem is not that I should have included gross fixed capital formation). What in my calculation is inconsistent with the calculations outputting D_cba_reg? Thanks a lot

konstantinstadler commented 3 years ago

Hi, you seem to have forgotten the final household demand which are included in the _reg accounts (F_Y)