generated from donotdespair/presentation-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1411 lines (1298 loc) · 56.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en"><head>
<script src="index_files/libs/clipboard/clipboard.min.js"></script>
<script src="index_files/libs/quarto-html/tabby.min.js"></script>
<script src="index_files/libs/quarto-html/popper.min.js"></script>
<script src="index_files/libs/quarto-html/tippy.umd.min.js"></script>
<link href="index_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="index_files/libs/quarto-html/light-border.css" rel="stylesheet">
<link href="index_files/libs/quarto-html/quarto-syntax-highlighting-2f5df379a58b258e96c21c0638c20c03.css" rel="stylesheet" id="quarto-text-highlighting-styles"><meta charset="utf-8">
<meta name="generator" content="quarto-1.6.42">
<meta name="author" content="Xiaolei (Adam) Wang">
<title>Introduction to Empirical Macroeconomics with R</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="index_files/libs/revealjs/dist/reset.css">
<link rel="stylesheet" href="index_files/libs/revealjs/dist/reveal.css">
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ color: #003b4f; background-color: #f1f3f5; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span { color: #003b4f; } /* Normal */
code span.al { color: #ad0000; } /* Alert */
code span.an { color: #5e5e5e; } /* Annotation */
code span.at { color: #657422; } /* Attribute */
code span.bn { color: #ad0000; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #003b4f; font-weight: bold; } /* ControlFlow */
code span.ch { color: #20794d; } /* Char */
code span.cn { color: #8f5902; } /* Constant */
code span.co { color: #5e5e5e; } /* Comment */
code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */
code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */
code span.dt { color: #ad0000; } /* DataType */
code span.dv { color: #ad0000; } /* DecVal */
code span.er { color: #ad0000; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #ad0000; } /* Float */
code span.fu { color: #4758ab; } /* Function */
code span.im { color: #00769e; } /* Import */
code span.in { color: #5e5e5e; } /* Information */
code span.kw { color: #003b4f; font-weight: bold; } /* Keyword */
code span.op { color: #5e5e5e; } /* Operator */
code span.ot { color: #003b4f; } /* Other */
code span.pp { color: #ad0000; } /* Preprocessor */
code span.sc { color: #5e5e5e; } /* SpecialChar */
code span.ss { color: #20794d; } /* SpecialString */
code span.st { color: #20794d; } /* String */
code span.va { color: #111111; } /* Variable */
code span.vs { color: #20794d; } /* VerbatimString */
code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="index_files/libs/revealjs/dist/theme/quarto-071a67d2d7d845729bac749b253aebfc.css">
<link href="index_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
<link href="index_files/libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
<link href="index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css" rel="stylesheet">
<link href="index_files/libs/revealjs/plugin/quarto-support/footer.css" rel="stylesheet">
<style type="text/css">
.reveal div.sourceCode {
margin: 0;
overflow: auto;
}
.reveal div.hanging-indent {
margin-left: 1em;
text-indent: -1em;
}
.reveal .slide:not(.center) {
height: 100%;
}
.reveal .slide.scrollable {
overflow-y: auto;
}
.reveal .footnotes {
height: 100%;
overflow-y: auto;
}
.reveal .slide .absolute {
position: absolute;
display: block;
}
.reveal .footnotes ol {
counter-reset: ol;
list-style-type: none;
margin-left: 0;
}
.reveal .footnotes ol li:before {
counter-increment: ol;
content: counter(ol) ". ";
}
.reveal .footnotes ol li > p:first-child {
display: inline-block;
}
.reveal .slide ul,
.reveal .slide ol {
margin-bottom: 0.5em;
}
.reveal .slide ul li,
.reveal .slide ol li {
margin-top: 0.4em;
margin-bottom: 0.2em;
}
.reveal .slide ul[role="tablist"] li {
margin-bottom: 0;
}
.reveal .slide ul li > *:first-child,
.reveal .slide ol li > *:first-child {
margin-block-start: 0;
}
.reveal .slide ul li > *:last-child,
.reveal .slide ol li > *:last-child {
margin-block-end: 0;
}
.reveal .slide .columns:nth-child(3) {
margin-block-start: 0.8em;
}
.reveal blockquote {
box-shadow: none;
}
.reveal .tippy-content>* {
margin-top: 0.2em;
margin-bottom: 0.7em;
}
.reveal .tippy-content>*:last-child {
margin-bottom: 0.2em;
}
.reveal .slide > img.stretch.quarto-figure-center,
.reveal .slide > img.r-stretch.quarto-figure-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-left,
.reveal .slide > img.r-stretch.quarto-figure-left {
display: block;
margin-left: 0;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-right,
.reveal .slide > img.r-stretch.quarto-figure-right {
display: block;
margin-left: auto;
margin-right: 0;
}
</style>
</head>
<body class="quarto-light">
<div class="reveal">
<div class="slides">
<section id="title-slide" class="quarto-title-block center">
<h1 class="title">Introduction to Empirical Macroeconomics with R</h1>
<p class="subtitle">Workshops for Ukraine</p>
<div class="quarto-title-authors">
<div class="quarto-title-author">
<div class="quarto-title-author-name">
Xiaolei (Adam) Wang <a href="https://orcid.org/0009-0005-6192-9061" class="quarto-title-author-orcid"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1N0NEMjA4MDI1MjA2ODExOTk0QzkzNTEzRjZEQTg1NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozM0NDOEJGNEZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozM0NDOEJGM0ZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZDN0YxMTc0MDcyMDY4MTE5NUZFRDc5MUM2MUUwNEREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU3Q0QyMDgwMjUyMDY4MTE5OTRDOTM1MTNGNkRBODU3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+84NovQAAAR1JREFUeNpiZEADy85ZJgCpeCB2QJM6AMQLo4yOL0AWZETSqACk1gOxAQN+cAGIA4EGPQBxmJA0nwdpjjQ8xqArmczw5tMHXAaALDgP1QMxAGqzAAPxQACqh4ER6uf5MBlkm0X4EGayMfMw/Pr7Bd2gRBZogMFBrv01hisv5jLsv9nLAPIOMnjy8RDDyYctyAbFM2EJbRQw+aAWw/LzVgx7b+cwCHKqMhjJFCBLOzAR6+lXX84xnHjYyqAo5IUizkRCwIENQQckGSDGY4TVgAPEaraQr2a4/24bSuoExcJCfAEJihXkWDj3ZAKy9EJGaEo8T0QSxkjSwORsCAuDQCD+QILmD1A9kECEZgxDaEZhICIzGcIyEyOl2RkgwAAhkmC+eAm0TAAAAABJRU5ErkJggg=="></a>
</div>
<p class="quarto-title-affiliation">
University of Melbourne
</p>
</div>
</div>
</section>
<section id="about-me" class="title-slide slide level1 center">
<h1>About me</h1>
<ul>
<li><p>PhD student at the University of Melbourne</p></li>
<li><p>Interested in Bayesian econometrics</p></li>
<li><p>Author of the R package <code>bsvarSIGNs</code></p></li>
</ul>
</section>
<section id="section" class="title-slide slide level1 center">
<h1></h1>
<div style="text-align:center; ">
<p><img data-src="bsvarSIGNs.png" style="width:50.0%;height:50.0%"></p>
</div>
</section>
<section id="plan-for-today" class="title-slide slide level1 center">
<h1>Plan for today</h1>
<ul>
<li><p>Vector Autoregression (VAR)</p></li>
<li><p>Structural Vector Autoregression (SVAR)</p></li>
<li><p>Applications in Macroeconomics</p></li>
<li><p>Many fun exercises in R!</p></li>
</ul>
</section>
<section id="prerequisites" class="title-slide slide level1 center">
<h1>Prerequisites</h1>
<ul>
<li>Install the <code>bsvarSIGNs</code> package</li>
</ul>
<div class="cell">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href=""></a><span class="fu">install.packages</span>(<span class="st">"bsvarSIGNs"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<ul>
<li>Install the <code>readxl</code> package</li>
</ul>
<div class="cell">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href=""></a><span class="fu">install.packages</span>(<span class="st">"readxl"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<ul>
<li>Download files from <a href="https://github.com/bsvars/2025-03-bsvarSIGNs-w4UKR/tree/master/exercises">https://github.com/bsvars/2025-03-bsvarSIGNs-w4UKR/tree/master/exercises</a></li>
</ul>
</section>
<section id="vector-autoregression" class="title-slide slide level1 center" data-background-color="#0056B9">
<h1>Vector Autoregression</h1>
</section>
<section id="vector-autoregression-var" class="title-slide slide level1 center">
<h1>Vector Autoregression (VAR)</h1>
<ul>
<li><p>A VAR model is a <code>system of equations</code> where each variable is regressed on its own lagged values and the lagged values of all other variables</p></li>
<li><p>This allows us to model the linear dynamic interdependencies</p></li>
<li><p>e.g. a bivariate VAR(1):</p>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
y_{1,t} \\
y_{2,t} \\
\end{bmatrix}
& =
\begin{bmatrix}
A_{1,11} & A_{1,12} \\
A_{1,21} & A_{1,22} \\
\end{bmatrix}
\begin{bmatrix}
y_{1,t-1} \\
y_{2,t-1} \\
\end{bmatrix}+
\begin{bmatrix}
\varepsilon_{1,t} \\
\varepsilon_{2,t} \\
\end{bmatrix},
& \begin{bmatrix}
\varepsilon_{1,t} \\
\varepsilon_{2,t} \\
\end{bmatrix}
~ & \sim N\left(
\begin{bmatrix}
0 \\
0 \\
\end{bmatrix},
\begin{bmatrix}
\Sigma_{11} & \Sigma_{12} \\
\Sigma_{12} & \Sigma_{22} \\
\end{bmatrix}
\right) \\
y_t & = A_1 y_{t-1} + \varepsilon_t
, & \varepsilon_t & \sim N(0, \Sigma)
\end{align*}
\]</span></p></li>
<li><p>Useful for forecasting, Granger causality test etc.</p></li>
</ul>
</section>
<section id="matrix-representation" class="title-slide slide level1 center">
<h1>Matrix representation</h1>
<ul>
<li><p>Generally, a VAR(p) model:</p>
<p><span class="math display">\[
\begin{align*}
y_t & = A_1 y_{t-1} + A_2 y_{t-2} + \dots + A_p y_{t-p} + A_dd_t + \varepsilon_t \\
y_t & =
\begin{bmatrix}
A_1 & \dots & A_p & A_d
\end{bmatrix}
\begin{bmatrix}
y_{t-1} \\
\vdots \\
y_{t-p} \\
d_t
\end{bmatrix}
+ \varepsilon_t \\
\end{align*}
\]</span></p></li>
<li><p>Where <span class="math inline">\(d_t\)</span> contains exogenous variables e.g. the constant term</p></li>
<li><p>More compatly,</p>
<p><span class="math display">\[
\begin{align*}
y_t & = Ax_t + \varepsilon_t, & \varepsilon_t & \sim N(0, \Sigma) \\
\end{align*}
\]</span></p></li>
</ul>
</section>
<section id="bayesian-estimation" class="title-slide slide level1 center">
<h1>Bayesian estimation</h1>
<ul>
<li><p>Want to estimate <span class="math inline">\(A\)</span> and <span class="math inline">\(\Sigma\)</span>, there is a conjugate prior</p>
<p><span class="math display">\[
A|\Sigma\sim MN(\underline{A}, \Sigma, \underline{V}),\quad \Sigma\sim IW(\underline{S}, \underline{\nu})
\]</span></p></li>
<li><p>This generates closed-form posterior distributions</p>
<p><span class="math display">\[
A|\Sigma,\text{data}\sim MN(\bar{A}, \Sigma, \bar{V}),\quad \Sigma|\text{data}\sim IW(\bar{S}, \bar{\nu})
\]</span></p></li>
<li><p><span class="math inline">\(MN\)</span> is the matrix normal distribution</p>
<p><span class="math display">\[
A\sim MN(M,U,V)\Leftrightarrow \text{vec}(A)\sim N(\text{vec}(M),V\otimes U)
\]</span></p></li>
<li><p><span class="math inline">\(IW\)</span> is the inverse Wishart distribution</p>
<ul>
<li>Distribution for positive-definite matrices (covariance)</li>
<li>A generalization of the inverse gamma distribution</li>
</ul></li>
</ul>
</section>
<section id="minnesota-prior" class="title-slide slide level1 center">
<h1>Minnesota prior</h1>
<ul>
<li><p>Still need to decide <span class="math inline">\(\underline{A}\)</span>, <span class="math inline">\(\underline{V}\)</span>, <span class="math inline">\(\underline{S}\)</span>, <span class="math inline">\(\underline{\nu}\)</span></p>
<ul>
<li>for non-stationary variables, set corresponding elements in <span class="math inline">\(\underline{A}\)</span> to 1</li>
<li>Shrink distant lagged coefficients to zero with small values in <span class="math inline">\(\underline{V}\)</span></li>
<li><span class="math inline">\(\underline{S}=I\)</span>, <span class="math inline">\(\underline{\nu}=n+2\)</span></li>
</ul></li>
<li><p>Improves forecast by reducing overfitting</p></li>
</ul>
</section>
<section id="an-example" class="title-slide slide level1 center">
<h1>An example</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb3-1"><a href=""></a><span class="fu">library</span>(bsvarSIGNs)</span>
<span id="cb3-2"><a href=""></a><span class="fu">head</span>(optimism)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> productivity stock_prices consumption real_interest_rate hours_worked
[1,] 0.2172072 -11.28895 -4.331866 0.008022252 -7.599184
[2,] 0.2129482 -11.17647 -4.324255 0.021877748 -7.592445
[3,] 0.2069894 -11.11805 -4.318455 0.018811208 -7.580577
[4,] 0.2003908 -11.08317 -4.301382 0.012867114 -7.572133
[5,] 0.1945243 -11.02211 -4.293948 0.024503568 -7.577512
[6,] 0.2002138 -11.06306 -4.291474 0.000876887 -7.577491</code></pre>
</div>
</div>
<ul>
<li><p>The <code>optimism</code> dataset is available in the <code>bsvarSIGNs</code> package</p></li>
<li><p>Contains 5 quarterly US data from 1955Q1 to 2010Q4<sup>1</sup></p>
<ul>
<li>productivity: total factor productivity on <a href="https://www.johnfernald.net/TFP">John Fernald’s website</a></li>
<li>stock prices: S&P 500 index divided by CPI, logged</li>
<li>consumption: real consumption expenditures, logged</li>
<li>real interest rate: federal funds rate minus inflation</li>
<li>hours worked: hours of all persons in the non-farm sector, logged</li>
</ul></li>
</ul>
<p><br></p>
<aside><ol class="aside-footnotes"><li id="fn1"><p><a href="https://doi.org/10.3386/w17651">Beaudry, P., Nam, D., & Wang, J. (2011)</a>, <a href="https://doi.org/10.3982/ECTA14468">Arias, J. E., Rubio‐Ramírez, J. F., & Waggoner, D. F. (2018)</a></p></li></ol></aside></section>
<section id="estimation-in-r" class="title-slide slide level1 center">
<h1>Estimation in R</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb5-1"><a href=""></a><span class="fu">set.seed</span>(<span class="dv">2025</span>)</span>
<span id="cb5-2"><a href=""></a>spec <span class="ot"><-</span> specify_bsvarSIGN<span class="sc">$</span><span class="fu">new</span>(optimism, <span class="at">p =</span> <span class="dv">4</span>)</span>
<span id="cb5-3"><a href=""></a>post <span class="ot"><-</span> <span class="fu">estimate</span>(spec, <span class="at">S =</span> <span class="dv">5000</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>**************************************************|
bsvarSIGNs: Bayesian Structural VAR with sign, |
zero and narrative restrictions |
**************************************************|
Progress of simulation for 5000 independent draws
Press Esc to interrupt the computations
**************************************************|</code></pre>
</div>
</div>
<ul>
<li>Two lines of code!</li>
</ul>
</section>
<section id="fitted-values" class="title-slide slide level1 center">
<h1>Fitted values</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb7-1"><a href=""></a>fit <span class="ot"><-</span> <span class="fu">compute_fitted_values</span>(post)</span>
<span id="cb7-2"><a href=""></a><span class="fu">plot</span>(fit)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<img data-src="index_files/figure-revealjs/unnamed-chunk-5-1.png" width="960" class="r-stretch"></section>
<section id="forecast" class="title-slide slide level1 center">
<h1>Forecast</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb8"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb8-1"><a href=""></a>forecast <span class="ot"><-</span> <span class="fu">forecast</span>(post, <span class="at">horizon =</span> <span class="dv">4</span>)</span>
<span id="cb8-2"><a href=""></a><span class="fu">plot</span>(forecast, <span class="at">data_in_plot =</span> .<span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<img data-src="index_files/figure-revealjs/unnamed-chunk-6-1.png" width="960" class="r-stretch"></section>
<section id="exercise-1" class="title-slide slide level1 center">
<h1>Exercise 1</h1>
<ul>
<li><p>Open the <code>ex1.R</code> file</p></li>
<li><p>Run the whole script to plot the fitted values and forecasts</p></li>
</ul>
</section>
<section id="structural-vector-autoregression" class="title-slide slide level1 center" data-background-color="#0056B9">
<h1>Structural Vector Autoregression</h1>
</section>
<section id="structural-vector-autoregression-svar" class="title-slide slide level1 center">
<h1>Structural Vector Autoregression (SVAR)</h1>
<ul>
<li><p>Recall the VAR equation</p>
<p><span class="math display">\[
y_t = Ax_t + \varepsilon_t
\]</span></p></li>
<li><p>SVAR defines a linear relation between <span class="math inline">\(\varepsilon_t\)</span> and strutural shocks <span class="math inline">\(u_t\)</span></p>
<p><span class="math display">\[
u_t = B\varepsilon_t,\quad u_t\sim N(0, I)
\]</span></p></li>
<li><p><span class="math inline">\(u_{1,t},\dots,u_{n,t}\)</span> are independent with each other and across time</p>
<ul>
<li>they are <span class="math inline">\(n\)</span> distinct causal drivers</li>
</ul></li>
<li><p>While <span class="math inline">\(\varepsilon_t\)</span> is a mixture of the structural shocks, causal relation is not clear <span class="math display">\[
\varepsilon_t = B^{-1}u_t = B_0u_t
\]</span></p></li>
</ul>
</section>
<section id="simultaneous-equation" class="title-slide slide level1 center">
<h1>Simultaneous equation</h1>
<ul>
<li><p>SVAR is a system of simultaneous equations</p>
<p><span class="math display">\[
\begin{align*}
y_t & = Ax_t + \varepsilon_t \\
y_t & = Ax_t + B_0u_t \\
By_t & = BAx_t + u_t
\end{align*}
\]</span></p></li>
<li><p>e.g. suppose supply and demand are determined simultaneously</p>
<p><span class="math display">\[
\begin{align*}
p_{t} & = \frac{-B_{12}}{B_{11}}q_t + \dots + \frac{1}{B_{11}}u_{t}^D, & B_{11}>0,B_{12}>0 \\
q_{t} & = \frac{-B_{21}}{B_{22}}p_t + \dots + \frac{1}{B_{22}}u_{t}^S, & B_{22}>0,B_{21}<0
\end{align*}
\]</span></p></li>
<li><p>In the SVAR notation, <span class="math display">\[
\begin{align*}
\begin{bmatrix}
B_{11} & B_{12} \\
B_{21} & B_{22} \\
\end{bmatrix}
\begin{bmatrix}
p_{t} \\
q_{t} \\
\end{bmatrix}
& =
\dots+
\begin{bmatrix}
u_{t}^D \\
u_{t}^S \\
\end{bmatrix} \\
By_t & = \dots+u_t
\end{align*}
\]</span></p></li>
</ul>
</section>
<section id="identification-problem" class="title-slide slide level1 center">
<h1>Identification problem</h1>
<ul>
<li><p>After fitting a VAR,</p>
<p><span class="math display">\[
y_t = Ax_t + \varepsilon_t,\quad \varepsilon_t\sim N(0, \Sigma)
\]</span></p></li>
<li><p>We have <span class="math inline">\(A\)</span> and <span class="math inline">\(\Sigma\)</span>, but without restrictions cannot recover <span class="math inline">\(B\)</span></p>
<p><span class="math display">\[
y_t = Ax_t + B^{-1}u_t,\quad u_t\sim N(0, I)
\]</span></p></li>
<li><p>Since <span class="math inline">\(B\)</span> has <span class="math inline">\(n^2\)</span> elements, and <span class="math inline">\(\Sigma\)</span> is symmetric and has only <span class="math inline">\(n(n+1)/2\)</span> elements</p></li>
<li><p>Need <span class="math inline">\(n(n-1)/2\)</span> restrictions to identify <span class="math inline">\(B\)</span></p>
<ul>
<li>e.g. fix <span class="math inline">\(B\)</span> to be lower triangular,</li>
</ul>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
\ast & 0 \\
\ast & \ast \\
\end{bmatrix}
\begin{bmatrix}
p_{t} \\
q_{t} \\
\end{bmatrix}
& =\dots+
\begin{bmatrix}
u_{t}^D \\
u_{t}^S \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>Can be controversial, price does not depend on quantity in demand equation?</p></li>
</ul>
</section>
<section id="sign-restriction-1-b" class="title-slide slide level1 center">
<h1>Sign restriction 1: <span class="math inline">\(B\)</span></h1>
<ul>
<li><p>A less controversial way is to impose sign restrictions</p></li>
<li><p>e.g. demand (supply) curve should have negative (positive) slope</p>
<ul>
<li>higher price <span class="math inline">\(\Rightarrow\)</span> lower (higher) quantity demanded (supplied)</li>
<li>normalize <span class="math inline">\(B_{11}\)</span> and <span class="math inline">\(B_{22}\)</span> positive</li>
<li>restrict <span class="math inline">\(B_{12}\)</span> positive and <span class="math inline">\(B_{21}\)</span> negative</li>
</ul>
<p><span class="math display">\[
\begin{align*}
B_{11}p_{t} & = -B_{12}q_t + \dots + u_{t}^D \\
B_{22}q_{t} & = -B_{21}p_t + \dots + u_{t}^S
\end{align*}
\]</span></p></li>
<li><p>In the SVAR notation, <span class="math display">\[
\begin{align*}
\begin{bmatrix}
+ & + \\
- & + \\
\end{bmatrix}
\begin{bmatrix}
p_{t} \\
q_{t} \\
\end{bmatrix}
& =\dots +
\begin{bmatrix}
u_{t}^D \\
u_{t}^S \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
</ul>
</section>
<section id="exercise-2" class="title-slide slide level1 center">
<h1>Exercise 2</h1>
<ul>
<li><p>Open the <code>ex2.R</code> file</p></li>
<li><p>This exercise simulates (log) price and (log) quantity data from</p>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
1 & 1 \\
-1 & 1 \\
\end{bmatrix}
\begin{bmatrix}
p_{t} \\
q_{t} \\
\end{bmatrix}
& =
\begin{bmatrix}
1 & 0 \\
0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
p_{t-1} \\
q_{t-1} \\
\end{bmatrix}+
\begin{bmatrix}
u_{t}^D \\
u_{t}^S \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>Goal: estimate matrix <span class="math inline">\(B\)</span> by imposing restrictions on</p>
<ul>
<li>structural matrix <span class="math inline">\(B\)</span></li>
<li>1 for positive, -1 for negative, NA for unrestricted</li>
</ul></li>
<li><p>Hint: slide 20</p></li>
</ul>
</section>
<section id="sign-restriction-2-irfs" class="title-slide slide level1 center">
<h1>Sign restriction 2: IRFs</h1>
<ul>
<li><p>There is nothing stopping us from imposing restrictions on <span class="math inline">\(B_0\)</span></p></li>
<li><p><span class="math inline">\(B_0\)</span> is the impulse response function (IRF) at horizon 0, why?</p>
<p><span class="math display">\[
y_t = Ax_t + B_0u_t
\]</span></p></li>
<li><p>e.g. consider the <code>optimism</code> dataset, can define optimistic shock as</p>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
\text{productivity}_t \\
\text{stock_prices}_t \\
\text{consumption}_t \\
\text{real_interest_rate}_t \\
\text{hours_worked}_t \\
\end{bmatrix}
=\dots+
\begin{bmatrix}
\ast & \ast & \ast & \ast & \ast \\
+ & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\end{bmatrix}
\begin{bmatrix}
u_{t}^\text{optimism} \\
u_{2,t} \\
u_{3,t} \\
u_{4,t} \\
u_{5,t} \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>Can impose restrictions on IRFs at further horizons</p>
<ul>
<li>e.g. <span class="math inline">\(A_1B_0\)</span> at horizon 1, etc. <span class="math display">\[
\begin{align*}
y_{t+1} & = A_1 y_{t} + \dots \\
& =A_1(Ax_t+B_0u_t)+\dots \\
& =A_1B_0u_t+\dots
\end{align*}
\]</span></li>
</ul></li>
</ul>
</section>
<section id="sign-restriction-3-narrative" class="title-slide slide level1 center">
<h1>Sign restriction 3: narrative</h1>
<ul>
<li><p>Suppose there is strong evidence for the history of the shocks</p></li>
<li><p>e.g. a negative (unfavorable) supply shock at the begining of COVID-19</p>
<p><span class="math display">\[
u_{2020Q1}^S < 0
\]</span></p></li>
<li><p>e.g. a negative optimism shock at the begining of Global Financial Crisis</p>
<ul>
<li>a pessimistic shock! <span class="math display">\[
u_{2007Q3}^{\text{optimism}} < 0
\]</span></li>
</ul></li>
</ul>
</section>
<section id="sign-and-zero-restriction" class="title-slide slide level1 center">
<h1>Sign and zero restriction</h1>
<ul>
<li><p>Placing <span class="math inline">\(n(n-1)/2\)</span> zero restrictions can be controversial</p></li>
<li><p>Might desire to impose just few zeros and signs on the IRFs</p></li>
<li><p>e.g. again the <code>optimism</code> dataset</p>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
\text{productivity}_t \\
\text{stock_prices}_t \\
\text{consumption}_t \\
\text{real_interest_rate}_t \\
\text{hours_worked}_t \\
\end{bmatrix}
=\dots+
\begin{bmatrix}
0 & \ast & \ast & \ast & \ast \\
+ & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast & \ast \\
\end{bmatrix}
\begin{bmatrix}
u_{t}^\text{optimism} \\
u_{2,t} \\
u_{3,t} \\
u_{4,t} \\
u_{5,t} \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>Can interpret first shock as an optimistic shock</p>
<ul>
<li>No effect on productivity</li>
<li>Positive effect on stock prices</li>
</ul></li>
</ul>
</section>
<section id="dynamic-causal-effects-irfs" class="title-slide slide level1 center">
<h1>Dynamic causal effects: IRFs</h1>
<img data-src="index_files/figure-revealjs/unnamed-chunk-7-1.png" width="960" class="r-stretch"></section>
<section id="visualize-structural-shocks" class="title-slide slide level1 center">
<h1>Visualize structural shocks</h1>
<img data-src="index_files/figure-revealjs/unnamed-chunk-8-1.png" width="960" class="r-stretch"></section>
<section id="exercise-3" class="title-slide slide level1 center">
<h1>Exercise 3</h1>
<ul>
<li><p>Open the <code>ex3.R</code> file</p></li>
<li><p>This exercise analyzes the US <code>optimism</code> dataset</p></li>
<li><p>Goal: replicate the IRF plot by imposing restrictions on</p>
<ul>
<li>IRFs</li>
<li>1 for positive, -1 for negative, NA for unrestricted, 0 for zero</li>
</ul></li>
<li><p>Hint: slide 24</p></li>
</ul>
</section>
<section id="exercise-4" class="title-slide slide level1 center">
<h1>Exercise 4</h1>
<ul>
<li><p>Open the <code>ex4.R</code> file</p></li>
<li><p>This exercise extends the analysis on the US <code>optimism</code> dataset</p></li>
<li><p>Goal: compare IRF plots by additionally imposing</p>
<ul>
<li>optimism shock is negative in 2007Q3, the start of the GFC</li>
</ul></li>
<li><p>Hint: slide 23, row 211 of the dataset corresponds to 2007Q3, and</p></li>
</ul>
<div class="cell">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb9-1"><a href=""></a>?specify_narrative</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
<section id="appliactions-in-macroeconomics" class="title-slide slide level1 center" data-background-color="#0056B9">
<h1>Appliactions in Macroeconomics</h1>
</section>
<section id="monetary-policies" class="title-slide slide level1 center">
<h1>Monetary policies</h1>
<ul>
<li>According to Wikipedia…</li>
</ul>
<blockquote>
<p>Monetary policy is the policy adopted by the monetary authority of a nation to affect monetary and other financial conditions to accomplish broader objectives like high employment and price stability.</p>
</blockquote>
<ul>
<li><p>Central banks can</p>
<ul>
<li>raise interest rate <span class="math inline">\(\Rightarrow\)</span> save more <span class="math inline">\(\Rightarrow\)</span> less money in market, contractionary</li>
<li>lower interest rate <span class="math inline">\(\Rightarrow\)</span> save less <span class="math inline">\(\Rightarrow\)</span> more money in market, expansionary</li>
</ul></li>
<li><p>Think of economy like a machine</p>
<ul>
<li>high inflation/output means overheating, need to cool down, contractionary monetary policy!</li>
<li>low inflation/output means underperforming, need to heat up, expansionary monetary policy!</li>
</ul></li>
</ul>
</section>
<section id="taylor-rule" class="title-slide slide level1 center">
<h1>Taylor rule</h1>
<ul>
<li><p>A simple rule to describe monetary policy</p>
<p><span class="math display">\[
i_t = r_t + \pi_t + a_\pi(\pi_t-\pi^*) + a_y(y_t-y^*), \quad a_\pi, a_y > 0
\]</span></p>
<ul>
<li><span class="math inline">\(i_t\)</span>: nominal policy interest rate</li>
<li><span class="math inline">\(r_t\)</span>: natural interest rate</li>
<li><span class="math inline">\(\pi_t\)</span>: inflation rate</li>
<li><span class="math inline">\(\pi^*\)</span>: inflation target</li>
<li><span class="math inline">\(y_t\)</span>: GDP</li>
<li><span class="math inline">\(y^*\)</span>: potential GDP</li>
</ul></li>
<li><p>Raise interest rate (cool down) when inflation/output is too high</p></li>
<li><p>Lower interest rate (heat up) when inflation/output is too low</p></li>
<li><p>Usually, there is some form of the Taylor rule in a SVAR model</p></li>
</ul>
</section>
<section id="an-australian-example" class="title-slide slide level1 center">
<h1>An Australian example</h1>
<ul>
<li><p>Is raising interest rate really contractionary?</p></li>
<li><p>Let’s analyze the effect of a positive monetary policy shock</p></li>
<li><p>4 variables, from 1982Q1 to 2019Q4<sup>1</sup></p>
<ul>
<li>CASH: cash rate, the policy interest rate in Australia</li>
<li>GDP: real gross domestic product</li>
<li>CPI: trimmed mean consumer price index, a measure of inflation</li>
<li>TWI: trade-weighted exchange rate, higher TWI means stronger AUD</li>
</ul></li>
</ul>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 6 × 5
Date CASH GDP CPI TWI
<dttm> <dbl> <dbl> <dbl> <dbl>
1 1982-03-31 00:00:00 15.4 156752 29.8 88.8
2 1982-06-30 00:00:00 18.4 158171 30.6 88.2
3 1982-09-30 00:00:00 17.8 157114 31.5 83.8
4 1982-12-31 00:00:00 13.7 154627 32.3 83.4
5 1983-03-31 00:00:00 13.9 153074 33.0 76.1
6 1983-06-30 00:00:00 12.1 152783 33.6 77.7</code></pre>
</div>
</div>
<p><br></p>
<aside><ol class="aside-footnotes"><li id="fn2"><p><a href="https://doi.org/10.1111/1475-4932.12749">Read, M. (2023)</a></p></li></ol></aside></section>
<section id="contemporaneous-relations-b" class="title-slide slide level1 center">
<h1>Contemporaneous relations <span class="math inline">\(B\)</span></h1>
<ul>
<li><p>Treat first shock as a monetary policy shock, using the SVAR notation,</p>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
B_{11} & B_{12} & B_{13} & B_{14} \\
B_{21} & B_{22} & B_{23} & B_{24} \\
B_{31} & B_{32} & B_{33} & B_{34} \\
B_{41} & B_{42} & B_{43} & B_{44} \\
\end{bmatrix}
\begin{bmatrix}
\text{CASH}_t \\
\text{GDP}_t \\
\text{CPI}_t \\
\text{TWI}_t \\
\end{bmatrix}
=\dots+
\begin{bmatrix}
u_{t}^{MP} \\
u_{2,t} \\
u_{3,t} \\
u_{4,t} \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>The first row is similar to the Taylor rule</p>
<p><span class="math display">\[
B_{11}\text{CASH}_t = -B_{12}\text{GDP}_t - B_{13}\text{CPI}_t - B_{14}\text{TWI}_t + \dots + u_{t}^{MP}
\]</span></p></li>
<li><p>Base on previous discussion, we can restrict</p>
<ul>
<li><span class="math inline">\(B_{11}>0\)</span>, normalization</li>
<li><span class="math inline">\(B_{12}<0\)</span>, cool down when high GDP</li>
<li><span class="math inline">\(B_{13}<0\)</span>, cool down when high inflation</li>
<li><span class="math inline">\(B_{14}>0\)</span>, discourage investing in AUD when high exchange rate</li>
</ul></li>
</ul>
</section>
<section id="irfs" class="title-slide slide level1 center">
<h1>IRFs</h1>
<ul>
<li><p>Restricting <span class="math inline">\(B\)</span> is not enough, let’s consider the IRFs</p></li>
<li><p>What happends to the variables when there is a positive monetary policy shock?</p>
<ul>
<li>CASH: increases, by definition</li>
<li>GDP: unrestricted, since we are interested in its response</li>
<li>CPI: decreases, expect negative inflation</li>
<li>TWI: increases, encourage investing in AUD</li>
</ul>
<p><span class="math display">\[
\begin{align*}
\begin{bmatrix}
\text{CASH}_t \\
\text{GDP}_t \\
\text{CPI}_t \\
\text{TWI}_t \\
\end{bmatrix}
=\dots+
\begin{bmatrix}
+ & \ast & \ast & \ast \\
\ast & \ast & \ast & \ast \\
- & \ast & \ast & \ast \\
+ & \ast & \ast & \ast \\
\end{bmatrix}
\begin{bmatrix}
u_{t}^{MP} \\
u_{2,t} \\
u_{3,t} \\
u_{4,t} \\
\end{bmatrix}
\end{align*}
\]</span></p></li>
<li><p>Can extend these restrictions to horizons <span class="math inline">\(1,2,3\)</span></p></li>
</ul>
</section>
<section id="result" class="title-slide slide level1 center">
<h1>Result</h1>
<img data-src="index_files/figure-revealjs/unnamed-chunk-11-1.png" width="960" class="r-stretch"></section>
<section id="exercise-5" class="title-slide slide level1 center">
<h1>Exercise 5</h1>
<ul>
<li><p>Open the <code>ex5.R</code> file</p></li>
<li><p>This exercise analyzes the Australian monetary policy dataset</p></li>
<li><p>Goal: replicate the IRF plot by imposing restrictions on</p>
<ul>
<li>structural matrix <span class="math inline">\(B\)</span></li>
<li>IRFs</li>
<li>1 for positive, -1 for negative, NA for unrestricted</li>
</ul></li>
<li><p>Hint: slide 33 and 34</p></li>
</ul>
</section>
<section id="section-1" class="title-slide slide level1 center">
<h1></h1>
<div style="text-align:center; ">
<p><img data-src="social.png" style="width:100.0%;height:100.0%"></p>
</div>
</section>
<section id="section-2" class="title-slide slide level1 center">
<h1></h1>
<p><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"></p>
<div style="text-align:center; ">
<p><img data-src="qiuqiu.jpg" style="width:30.0%;height:30.0%"></p>
<div style="display: inline-block; text-align:left;">
<p><i class="fa-solid fa-envelope"></i> adamwang15[at]gmail.com</p>
<p><i class="fa-brands fa-linkedin"></i> adamwang15</p>
<p><i class="fa-brands fa-github"></i> adamwang15</p>
<p><i class="fa-brands fa-bluesky"></i> adamwang15.bsky.social</p>
</div>
</div>
</section>
</div>
<div class="quarto-auto-generated-content" style="display: none;">
<div class="footer footer-default">
</div>
</div></div>
<script>window.backupDefine = window.define; window.define = undefined;</script>
<script src="index_files/libs/revealjs/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="index_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
<script src="index_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
<script src="index_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
<script src="index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
<script src="index_files/libs/revealjs/plugin/quarto-support/support.js"></script>
<script src="index_files/libs/revealjs/plugin/notes/notes.js"></script>
<script src="index_files/libs/revealjs/plugin/search/search.js"></script>
<script src="index_files/libs/revealjs/plugin/zoom/zoom.js"></script>
<script src="index_files/libs/revealjs/plugin/math/math.js"></script>
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': false,