-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
A new Tauchen was added to the interpolation/quadrature lectures in #370
We should now convert over to using it across the lectures. For this, you can copy/paste a minimal version in each lecture that requires tauchen and just make sure the link to that new lecture is there.
function tauchen(N, rho, sigma, mu, m = 3)
mu_X = mu / (1 - rho)
sigma_X = sigma / sqrt(1 - rho^2)
z = range(-m*sigma_X, m*sigma_X, length = N)
midpoints = (z[1:(end - 1)] .+ step(z)/2)'
F = cdf.(Normal(), (midpoints .- rho .* z) ./ sigma)
P = [F[:, 1] diff(F, dims = 2) (1 .- F[:, end])]
return (;P, mu_X, sigma_X, x = z .+ mu_X)
endThe challenge is that we won't be able to complete this before implementing the simulate.
Metadata
Metadata
Assignees
Labels
No labels