Skip to content

Commit 6591122

Browse files
committed
add new plot files
1 parent 79e59df commit 6591122

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/src/irf.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,12 @@ plot_irf(Gali_2015_chapter_3_nonlinear,
959959

960960
# Add second shock to show cumulative effect
961961
plot_irf!(Gali_2015_chapter_3_nonlinear,
962-
shocks = :nu,
962+
shocks = :eps_nu,
963963
plot_type = :stack)
964964
```
965965

966+
![Gali 2015 IRF - stacked shocks (eps_a and eps_nu)](../assets/stack__Gali_2015_chapter_3_nonlinear__multiple_shocks__2.png)
967+
966968
The `:stack` visualization shows how each shock contributes to the total response, with the second shock's effect layered on top of the first.
967969

968970
#### Using `:compare` for Parameter Comparisons
@@ -973,17 +975,17 @@ When comparing IRFs across different parameter values, `:compare` displays the r
973975
# Baseline parameterization
974976
plot_irf(Gali_2015_chapter_3_nonlinear,
975977
parameters = ( => 0.99,),
976-
shocks = :eps_a,
977-
label = "β = 0.99")
978+
shocks = :eps_a)
978979

979980
# Alternative parameterization for comparison
980981
plot_irf!(Gali_2015_chapter_3_nonlinear,
981982
parameters = ( => 0.95,),
982983
shocks = :eps_a,
983-
label = "β = 0.95",
984984
plot_type = :compare)
985985
```
986986

987+
![Gali 2015 IRF - comparing β values](../assets/compare__Gali_2015_chapter_3_nonlinear__eps_a__2.png)
988+
987989
The `:compare` option (the default) makes it easy to see how parameter changes affect the IRF magnitude and persistence.
988990

989991
### Plot Attributes
@@ -1132,10 +1134,10 @@ Both models now appear in the plot with consistent, readable labels, making comp
11321134
The `rename_dictionary` also works with shocks. For example, Gali_2015_chapter_3_nonlinear has shocks `eps_a` and `nu`, while FS2000 has `e_a` and `e_m`. To compare these with consistent labels:
11331135

11341136
```julia
1135-
# Gali model with shocks eps_a and nu
1137+
# Gali model with shocks eps_a and eps_nu
11361138
plot_irf(Gali_2015_chapter_3_nonlinear,
1137-
shocks = [:eps_a, :nu],
1138-
rename_dictionary = Dict(:eps_a => "Technology Shock", :nu => "Monetary Policy Shock"))
1139+
shocks = [:eps_a, :eps_nu],
1140+
rename_dictionary = Dict(:eps_a => "Technology Shock", :eps_nu => "Monetary Policy Shock"))
11391141

11401142
# FS2000 model with shocks e_a and e_m
11411143
plot_irf!(FS2000,

0 commit comments

Comments
 (0)