@@ -11,7 +11,6 @@ kernelspec:
11
11
name : python3
12
12
---
13
13
14
- +++ {"user_expressions": [ ] }
15
14
16
15
# Input-Output Models
17
16
@@ -20,9 +19,8 @@ kernelspec:
20
19
This lecture requires the following imports and installs before we proceed.
21
20
22
21
``` {code-cell} ipython3
23
- ---
24
- tags: [hide-output]
25
- ---
22
+ :tags: [hide-output]
23
+
26
24
!pip install quantecon_book_networks
27
25
!pip install quantecon
28
26
```
@@ -34,15 +32,14 @@ import networkx as nx
34
32
import matplotlib.pyplot as plt
35
33
```
36
34
37
- +++ {"user_expressions": [ ] }
38
35
39
- The following figure illustrates a network of linkages between 15 sectors obtained from the US Bureau of Economic Analysis’s
40
- 2019 Input-Output Accounts Data.
36
+ The following figure illustrates a network of linkages between 15 sectors
37
+ obtained from the US Bureau of Economic Analysis’s 2019 Input-Output Accounts
38
+ Data.
41
39
42
40
``` {code-cell} ipython3
43
- ---
44
- tags: [hide-cell]
45
- ---
41
+ :tags: [hide-cell]
42
+
46
43
import quantecon as qe
47
44
import quantecon_book_networks
48
45
import quantecon_book_networks.input_output as qbn_io
@@ -58,9 +55,8 @@ mpl.rcParams.update(mpl.rcParamsDefault)
58
55
```
59
56
60
57
``` {code-cell} ipython3
61
- ---
62
- tags: [hide-cell]
63
- ---
58
+ :tags: [hide-cell]
59
+
64
60
def build_coefficient_matrices(Z, X):
65
61
"""
66
62
Build coefficient matrices A and F from Z and X via
@@ -88,9 +84,9 @@ A, F = build_coefficient_matrices(Z, X)
88
84
---
89
85
mystnb:
90
86
figure:
91
- caption: "US 15 Sector Production Network "
87
+ caption: "US 15 sector production network "
92
88
name: us_15sectors
93
- tags: [hide-input ]
89
+ : tags: [hide-cell ]
94
90
---
95
91
centrality = qbn_io.eigenvector_centrality(A)
96
92
@@ -107,7 +103,6 @@ qbn_plt.plot_graph(A, X, ax, codes,
107
103
plt.show()
108
104
```
109
105
110
- +++ {"user_expressions": [ ] }
111
106
112
107
| Label| Sector | Label| Sector | Label| Sector |
113
108
| :---:| :-------------:| :---:| :--------------:| :---:| :-------------------------:|
@@ -117,19 +112,22 @@ plt.show()
117
112
| co | Construction | in | Information | ot | Other Services (exc govt) |
118
113
| ma | Manufacturing | fi | Finance | go | Government |
119
114
120
- +++ {"user_expressions": [ ] }
121
115
122
- An arrow from $i$ to $j$ implies that sector $i$ supplies some of its output as raw material to sector $j$.
116
+ An arrow from $i$ to $j$ implies that sector $i$ supplies some of its output as
117
+ raw material to sector $j$.
123
118
124
- Economies are characterised by many such complex and interdependent multisector production networks.
119
+ Economies are characterised by many such complex and interdependent multisector
120
+ production networks.
125
121
126
- A basic framework for their analysis is [ Leontief's] ( https://en.wikipedia.org/wiki/Wassily_Leontief ) input-output model.
122
+ A basic framework for their analysis is
123
+ [ Leontief's] ( https://en.wikipedia.org/wiki/Wassily_Leontief ) input-output model.
127
124
128
125
This model's key aspect is its simplicity.
129
126
130
- In this lecture, we first introduce the standard input-ouput model and approach it as a [ linear programming] (link to lpp lecture) problem.
127
+ In this lecture, we first introduce the standard input-ouput model and approach it as a linear programming problem.
128
+
129
+ (TODO add link to lpp lecture)
131
130
132
- +++ {"user_expressions": [ ] }
133
131
134
132
## Input Output Analysis
135
133
149
147
The production function for goods $j \in \{ 1, \ldots , n\} $ is the ** Leontief** function
150
148
151
149
$$
152
- x_j = \min_{i \in \{0, \ldots , n \}} \left( \frac{z_{ij}}{a_{ij}}\right)
150
+ x_j = \min_{i \in \{0, \ldots , n \}} \left( \frac{z_{ij}}{a_{ij}}\right)
153
151
$$
154
152
155
153
### Two Goods
@@ -160,7 +158,7 @@ The following is a simple illustration of this network.
160
158
161
159
``` {code-cell} ipython3
162
160
---
163
- tags: [hide-input ]
161
+ : tags: [hide-cell ]
164
162
---
165
163
G = nx.DiGraph()
166
164
@@ -192,8 +190,6 @@ plt.text(1.6,-0.5, r'$d_{2}$')
192
190
plt.show()
193
191
```
194
192
195
- +++ {"user_expressions": [ ] }
196
-
197
193
** Feasible allocations must satisfy**
198
194
199
195
$$
@@ -208,7 +204,7 @@ This can be graphically represented as follows.
208
204
209
205
``` {code-cell} ipython3
210
206
---
211
- tags: [hide-input ]
207
+ : tags: [hide-cell ]
212
208
---
213
209
from matplotlib.patches import Polygon
214
210
@@ -455,7 +451,7 @@ The dual problem can be graphically represented as follows.
455
451
456
452
```{code-cell} ipython3
457
453
---
458
- tags: [hide-input ]
454
+ : tags: [hide-cell ]
459
455
---
460
456
from matplotlib.patches import Polygon
461
457
522
518
E = \{ (i,j) \in V \times V : a_ {ij}>0\}
523
519
$$
524
520
525
- In {numref}`us_15sectors` weights are indicated by the widths of the arrows, which are proportional to the corresponding
526
- input-output coefficients.
521
+ In {numref}`us_15sectors` weights are indicated by the widths of the arrows, which are proportional to the corresponding input-output coefficients.
527
522
528
523
We can now use centrality measures to rank sectors and discuss their importance relative to the other sectors.
529
524
539
534
We plot a bar graph of hub-based eigenvector centrality for the sectors represented in {numref}`us_15sectors`.
540
535
541
536
```{code-cell} ipython3
542
- tags: [hide-input ]
537
+ : tags: [hide-cell ]
543
538
544
539
fig, ax = plt.subplots()
545
540
ax.bar(codes, centrality, color=color_list, alpha=0.6)
546
541
ax.set_ylabel("eigenvector centrality", fontsize=12)
547
542
plt.show()
548
543
```
549
544
550
- +++ {"user_expressions": []}
551
545
552
546
A higher measure indicates higher importance as a supplier.
553
547
@@ -579,10 +573,11 @@ High ranking sectors within this measure are important buyers of intermediate go
579
573
580
574
A demand shock in such sectors will cause a large impact on the whole production network.
581
575
582
- The following figure displays the output multipliers for the sectors represented in {numref}`us_15sectors`.
576
+ The following figure displays the output multipliers for the sectors represented
577
+ in {numref}`us_15sectors`.
583
578
584
579
```{code-cell} ipython3
585
- tags: [hide-input ]
580
+ : tags: [hide-cell ]
586
581
587
582
omult = qbn_io.katz_centrality(A, authority=True)
588
583
@@ -593,19 +588,17 @@ ax.set_ylabel("Output multipliers", fontsize=12)
593
588
plt.show()
594
589
```
595
590
596
- +++ {"user_expressions": []}
597
591
598
592
We observe that manufacturing and agriculture are highest ranking sectors.
599
593
600
- +++ {"user_expressions": []}
601
594
602
595
## Exercises
603
596
604
597
```{exercise-start}
605
598
:label: io_ex1
606
599
```
607
600
608
- {cite}DoSSo Chapter 9 carries along an example with the following
601
+ {cite}` DoSSo` Chapter 9 discusses an example with the following
609
602
parameter settings:
610
603
611
604
$$
0 commit comments