-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update markov_approx.jl #139
Conversation
Tests fail in Julia 0.6 due to change in function of operator ".+="; so this proposal creates a new variable for the mean-variance standardized linspace vector and passes that on to the MarkovChain function.
Current coverage is 93.36% (diff: 100%)@@ master #139 diff @@
==========================================
Files 19 19
Lines 1146 1146
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1068 1070 +2
+ Misses 78 76 -2
Partials 0 0
|
@@ -73,13 +73,13 @@ function tauchen(N::Integer, ρ::Real, σ::Real, μ::Real=0.0, n_std::Integer=3) | |||
# the cdf with a function that allows the distribution of input | |||
# arguments to be [μ/(1 - ρ), 1] instead of [0, 1] | |||
|
|||
y .+= μ / (1 - ρ) # center process around its mean (wbar / (1 - rho)) | |||
yy = zeros(size(y)) .+ (μ / (1 - ρ)) # center process around its mean (wbar / (1 - rho)) in new variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just be yy = y .+ μ / (1 + ρ)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes more sense to me too.
@colbec would you be willing to make this change? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spencerlyon2 Of course, thanks for the correction. I have changed my commit; I'm a bit of a beginner here with this process so please let me know if I have missed some part of the chain of events.
1 similar comment
Thank you for contributing @colbec. The PR is great! |
Tests fail in Julia 0.6 due to change in function of operator ".+="; so this proposal creates a new variable for the mean-variance standardized linspace vector and passes that on to the MarkovChain function.
Ref: #132