Skip to content

Commit

Permalink
Correct error in drawing from beta posterior distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-metherell authored Aug 29, 2024
1 parent bd95041 commit 0b8ae5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/normImpute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function blrDraw!(
end

σ̇ = sqrt(sum((yₒ - Xₒ * β̂).^2)) / rand(Chisq(max(length(yₒ) - size(Xₒ, 2), 1)))
β̇ = β̂ + σ̇ * cholesky((V + transpose(V)) / 2).factors * randn(size(Xₒ, 2))
β̇ = β̂ + σ̇ * cholesky(Hermitian(V)).L * randn(size(Xₒ, 2))

return β̂, β̇, σ̇
end
end

0 comments on commit 0b8ae5d

Please sign in to comment.