diff --git a/lectures/lake_model_intro.md b/lectures/lake_model_intro.md index 7a02138b..282a0c8e 100644 --- a/lectures/lake_model_intro.md +++ b/lectures/lake_model_intro.md @@ -93,7 +93,7 @@ We are interested in how $u_t$ and $e_t$ evolve over time. What long-run unemployment rate and employment rate should we expect? -Do long-run outcomes depend on the initial values $(u_0, e_o)$? +Do long-run outcomes depend on the initial values $(u_0, e_0)$? ### Visualising the long-run outcomes @@ -335,7 +335,7 @@ def plot_time_paths(lm, x0=None, T=1000, ax=None): # Plot time series for x in x0: - x_ts = lm.simulate_path(x0=x) + x_ts = lm.simulate_path(x0=x, T=T) ax.scatter(x_ts[0, :], x_ts[1, :], s=4,) diff --git a/lectures/long_run_growth.md b/lectures/long_run_growth.md index b999eedf..2a570f40 100644 --- a/lectures/long_run_growth.md +++ b/lectures/long_run_growth.md @@ -141,7 +141,7 @@ We create a variable `color_mapping` to store a map between country codes and co ```{code-cell} ipython3 :tags: [hide-input] -country_names = data['countrycode'] +country_names = data['countrycode'].unique() # Generate a colormap with the number of colors matching the number of countries colors = cm.tab20(np.linspace(0, 0.95, len(country_names))) diff --git a/lectures/time_series_with_matrices.md b/lectures/time_series_with_matrices.md index 9817e1e1..560ceed0 100644 --- a/lectures/time_series_with_matrices.md +++ b/lectures/time_series_with_matrices.md @@ -467,11 +467,13 @@ Let's begin by generating $N$ time realizations of $y$ plotting them together wi # Plot mean N = 100 +ys = series_process.sample_y(N, rng=rng) + for i in range(N): col = cm.viridis(rng.random()) # Choose a random color from viridis - ys = series_process.sample_y(N, rng=rng) plt.plot(ys[i,:], lw=0.5, color=col) - plt.plot(μ_y, color='red') + +plt.plot(μ_y, color='red') plt.xlabel('t') plt.ylabel('y')