Skip to content

Commit e9e468d

Browse files
authored
Merge branch 'main' into patch-5
2 parents 22df95c + ae928c8 commit e9e468d

34 files changed

Lines changed: 4608 additions & 1323 deletions
1 Byte
Loading

lectures/ar1_processes.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ These simple models are used again and again in economic research to represent t
3636
* productivity, etc.
3737

3838
We are going to study AR(1) processes partly because they are useful and
39-
partly because they help us understand important concepts.
39+
partly because they help us understand important concepts.
4040

4141
Let's start with some imports:
4242

@@ -56,14 +56,14 @@ The **AR(1) model** (autoregressive model of order 1) takes the form
5656
X_{t+1} = a X_t + b + c W_{t+1}
5757
```
5858

59-
where $a, b, c$ are scalar-valued parameters
59+
where $a, b, c$ are scalar-valued parameters
6060

6161
(Equation {eq}`can_ar1` is sometimes called a **stochastic difference equation**.)
6262

6363
```{prf:example}
6464
:label: ar1_ex_ar
6565
66-
For example, $X_t$ might be
66+
For example, $X_t$ might be
6767
6868
* the log of labor income for a given household, or
6969
* the log of money demand in a given economy.
@@ -356,9 +356,7 @@ In this equation, we can use observed data to evaluate the left hand side of {eq
356356

357357
And we can use a theoretical AR(1) model to calculate the right hand side.
358358

359-
If $\frac{1}{m} \sum_{t = 1}^m X_t$ is not close to $\psi^*(x)$, even for many
360-
observations, then our theory seems to be incorrect and we will need to revise
361-
it.
359+
If $\frac{1}{m} \sum_{t = 1}^m h(X_t)$ is not close to $\int h(x)\psi^*(x) dx$, even for many observations, then our theory seems to be incorrect and we will need to revise it.
362360

363361

364362
## Exercises
@@ -427,8 +425,8 @@ def true_moments_ar1(k):
427425
return 0
428426
429427
k_vals = np.arange(6) + 1
430-
sample_moments = np.empty_like(k_vals)
431-
true_moments = np.empty_like(k_vals)
428+
sample_moments = np.empty(len(k_vals), dtype=float)
429+
true_moments = np.empty(len(k_vals), dtype=float)
432430
433431
for k_idx, k in enumerate(k_vals):
434432
sample_moments[k_idx] = sample_moments_ar1(k)
@@ -464,8 +462,8 @@ $$
464462
For $K$ use the Gaussian kernel ($K$ is the standard normal
465463
density).
466464
467-
Write the class so that the bandwidth defaults to Silvermans rule (see
468-
the rule of thumb discussion on [this
465+
Write the class so that the bandwidth defaults to Silverman's rule (see
466+
the "rule of thumb" discussion on [this
469467
page](https://en.wikipedia.org/wiki/Kernel_density_estimation)). Test
470468
the class you have written by going through the steps
471469

0 commit comments

Comments
 (0)