Skip to content

Commit

Permalink
bug fix in Markov chain simulation
Browse files Browse the repository at this point in the history
With num_reps > 1 the t+1 draw of the chain was always using the distribution conditional on the value at t for the first repetition.
  • Loading branch information
amckay committed Jul 15, 2016
1 parent fae6e19 commit 097cf36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/markov/mc_tools.jl
Expand Up @@ -382,7 +382,7 @@ function simulate!(mc::MarkovChain, X::Matrix{Int})

for i in 1:k
for t in 1:ts_length-1
X[t+1, i] = draw(P_dist[X[t]])
X[t+1, i] = draw(P_dist[X[t,i]])
end
end
X
Expand Down

0 comments on commit 097cf36

Please sign in to comment.