From 642a4f4699a938491109e064d4b3ace378478f0a Mon Sep 17 00:00:00 2001 From: JingkunZhao Date: Mon, 8 Jul 2024 16:25:29 +1000 Subject: [PATCH 1/3] [AR1] Update unfinished suggestions --- lectures/ar1_processes.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lectures/ar1_processes.md b/lectures/ar1_processes.md index 3df2c113b..4c2cccf8c 100644 --- a/lectures/ar1_processes.md +++ b/lectures/ar1_processes.md @@ -56,7 +56,7 @@ The *AR(1) model* (autoregressive model of order 1) takes the form X_{t+1} = a X_t + b + c W_{t+1} ``` -where $a, b, c$ are scalar-valued parameters. +where $a, b, c$ are scalar-valued parameters and the equation is a **stochastic recurrence relations**. For example, $X_t$ might be @@ -88,6 +88,7 @@ Iterating backwards from time $t$, we obtain $$ X_t = a X_{t-1} + b + c W_t = a^2 X_{t-2} + a b + a c W_{t-1} + b + c W_t + = a^3 X_{t-3} + a^2 b + a^2 c W_{t-2} + b + c W_t = \cdots $$ @@ -200,7 +201,7 @@ Notice that, in the figure above, the sequence $\{ \psi_t \}$ seems to be conver This is even clearer if we project forward further into the future: ```{code-cell} python3 -def plot_density_seq(ax, mu_0=-3.0, v_0=0.6, sim_length=60): +def plot_density_seq(ax, mu_0=-3.0, v_0=0.6, sim_length=40): mu, v = mu_0, v_0 for t in range(sim_length): mu = a * mu + b @@ -220,7 +221,7 @@ For example, this alternative density sequence also converges to the same limit. ```{code-cell} python3 fig, ax = plt.subplots() -plot_density_seq(ax, mu_0=3.0) +plot_density_seq(ax, mu_0=4.0) plt.show() ``` @@ -255,7 +256,7 @@ We can confirm this is valid for the sequence above using the following code. ```{code-cell} python3 fig, ax = plt.subplots() -plot_density_seq(ax, mu_0=3.0) +plot_density_seq(ax, mu_0=4.0) mu_star = b / (1 - a) std_star = np.sqrt(c**2 / (1 - a**2)) # square root of v_star From 075993e3f0be6736b8226c8927389927b8066458 Mon Sep 17 00:00:00 2001 From: JingkunZhao Date: Mon, 8 Jul 2024 16:44:16 +1000 Subject: [PATCH 2/3] Update ar1_processes.md --- lectures/ar1_processes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/ar1_processes.md b/lectures/ar1_processes.md index 4c2cccf8c..ffccf1e1a 100644 --- a/lectures/ar1_processes.md +++ b/lectures/ar1_processes.md @@ -56,7 +56,7 @@ The *AR(1) model* (autoregressive model of order 1) takes the form X_{t+1} = a X_t + b + c W_{t+1} ``` -where $a, b, c$ are scalar-valued parameters and the equation is a **stochastic recurrence relations**. +where $a, b, c$ are scalar-valued parameters and the equation is a *stochastic recurrence relations*. For example, $X_t$ might be From 02b7bd8881060c72a5b57f1872a17457ef55c115 Mon Sep 17 00:00:00 2001 From: John Stachurski Date: Tue, 9 Jul 2024 08:24:12 +1000 Subject: [PATCH 3/3] misc --- lectures/ar1_processes.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lectures/ar1_processes.md b/lectures/ar1_processes.md index ffccf1e1a..90cc05140 100644 --- a/lectures/ar1_processes.md +++ b/lectures/ar1_processes.md @@ -48,7 +48,7 @@ plt.rcParams["figure.figsize"] = (11, 5) #set default figure size ## The AR(1) model -The *AR(1) model* (autoregressive model of order 1) takes the form +The **AR(1) model** (autoregressive model of order 1) takes the form ```{math} :label: can_ar1 @@ -56,7 +56,9 @@ The *AR(1) model* (autoregressive model of order 1) takes the form X_{t+1} = a X_t + b + c W_{t+1} ``` -where $a, b, c$ are scalar-valued parameters and the equation is a *stochastic recurrence relations*. +where $a, b, c$ are scalar-valued parameters + +(Equation {eq}`can_ar1` is sometimes called a **stochastic difference equation**.) For example, $X_t$ might be