-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
downstream sales coefficient calculations (and Ghosh) #145
Comments
Happy to change As to B in my next pull request (it's in fact already on my to-do). Regarding the definition of the Ghosh inverse: I am aware that it is the transpose compared to the definition in several papers in literature, including Miller and Blair. For value-added (v) and final-demand (y) methods, it is convenient to work with L.dot(y) and v.dot(G). However, for the combined upstream and downstream footprint of some economic activity it is somewhat cumbersome to have the upstream footprint vector vertically and downstream horizontally. The total footprint(s) of satellite account(s) F of any economic activity expressed in terms of vertical revenue-vector r can now be expressed as F.dot(L+G-I).dot(r). |
Hi, I'd say it is best to keep consistency to established methods. It gets too confusing if there are slightly different implementations. Not everyone will use the sales coefficients and Ghosh in the way you do. For your implementation, it is still pretty straightforward, as you just need to transpose G when using it: F.dot(L+G.T-I).dot(r). That'd have to be easier right? |
I changed the implementation for Ghosh accordingly with PR #146. |
@Beckebanze
It seems that the Ghosh implementation in pymrio is transposed to normal? As is transposed (G is calculated correctly). As should be sales coefficients – so along a row, how much of the sale of commodity A to total sales of commodity A. If a fix is generated, great if you can use conventional nomenclature (B instead of As).
See p543 and so on of miller and blair
sorry, formatting of py code is off...
`
import pymrio
import numpy as np
load the test system
io = pymrio.load_test()
calculate the basic parts of the system
io.calc_all()
we need value added, but the test system doesn't have an explicit value added - so we generate it as the different between total output(=total input) and intermediate inputs
io.v=io.x.T - io.Z.sum(axis=0)
standard Ghosh
x=[email protected]
print(x.T-io.x)
alt standard method is
x=[email protected]
print(x-io.x)
why transpose? this works
x=[email protected]
print(x.T-io.x)
why transpose? this works
x=[email protected]
print(x-io.x)
`
The text was updated successfully, but these errors were encountered: