You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/tools_and_techniques/stationary_densities.md
+19-25Lines changed: 19 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,8 +68,8 @@ Markov process.
68
68
---
69
69
tags: [hide-output]
70
70
---
71
-
using LinearAlgebra, Statistics
72
-
using KernelDensity, Distributions, LaTeXStrings, Plots, QuantEcon, Random
71
+
using LinearAlgebra, Statistics, Distributions, LaTeXStrings, Plots, StatsPlots,
72
+
Random
73
73
```
74
74
75
75
(statd_density_case)=
@@ -432,17 +432,7 @@ In fact much stronger convergence results are true (see, for example, [this pape
432
432
```
433
433
434
434
### Implementation
435
-
436
-
A function which calls an `LAE` type for estimating densities by this technique can be found in [lae.jl](https://github.com/QuantEcon/QuantEcon.jl/blob/master/src/lae.jl).
437
-
438
-
This function returns the right-hand side of {eq}`statd_lae1` using
439
-
440
-
* an object of type `LAE` that stores the stochastic kernel and the observations
441
-
* the value $y$ as its second argument
442
-
443
-
The function is vectorized, in the sense that if `psi` is such an instance and `y` is an array, then the call `psi(y)` acts elementwise.
444
-
445
-
(This is the reason that we reshaped `X` and `y` inside the type --- to make vectorization work)
435
+
We'll implement a function `lae_est(p, X, ygrid)` that returns the right-hand side of {eq}`statd_lae1`, averaging the kernel $p$ over simulated draws `X` on a grid `ygrid` (see [here](https://github.com/QuantEcon/QuantEcon.jl/blob/master/src/lae.jl) for the original implementation)
446
436
447
437
### Example
448
438
@@ -456,8 +446,6 @@ using Test
456
446
```
457
447
458
448
```{code-cell} julia
459
-
using Distributions, StatsPlots, Plots, QuantEcon, Random
0 commit comments