db.s
For the standalone function, see mario.calc_s().
Calculate activity-by-commodity supply coefficients using the database technology assumption.
Inputs#
S: supply flows, with activity rows and commodity columns.
For IT, Xc is indexed like S.columns. For PT, Xa is
indexed like S.index; the intermediate product-mix matrix is c.
Result#
Activity nodes on rows and commodity nodes on columns. Under IT,
s is the market-share matrix. Under PT, it is the inverse of c.
Calculation details#
db.tech_assumption selects IT (industry-based) or PT
(product-based). PT requires square c; its inverse swaps the
commodity and activity axes. If c is singular, the current inverse
builder falls back to the Moore-Penrose pseudoinverse. Under IT, zero
commodity production gives a zero coefficient column.
See Supply and Use Tables for assumption switching and the fallback to IT when importing a non-square SUT.
Example#
import mario
db = mario.load_test("SUT", tech_assumption="IT")
result = db.resolve("s")
# Dotted access requests the same block:
result = db.s
Use resolve for scenario selection and recomputation options. Existing targets are reused. The other SUT equations are listed in Resolvable Matrices and Blocks.