Sean Pinkney
Sean Pinkney
I have written the `wiener_rng` function in Stan at https://discourse.mc-stan.org/t/alternative-to-wiener-rng-in-stan/28443/8?u=spinkney. It should be pretty straightforward for someone to put this into stan-math.
And now it actually works too! https://discourse.mc-stan.org/t/alternative-to-wiener-rng-in-stan/28443/11?u=spinkney
> Unconstraining transform > We also need the transform to go from the constrained to the unconstrained spaces (for initialization). I couldn't find it in the paper. > I don't...
> What we do with the unit vector coding is to make the transform `f` (constrained to unconstrained) one to one and the inverse transform `f_inv` many to one, making...
Be careful with this as it does lose a lot of precision for very small `x` values. See discussion at https://bugs.r-project.org/show_bug.cgi?id=16332#c7. We'll have to branch across different values of `x`.
Umm, when I tested this in R it wasn't good but boost's implementation in c++ is good in a wide range of `x` values.
I think what you have will work! Looking forward to more stable cdfs!
The schur decomposition can be used to calculate the matrix square root (they did it in Jax https://github.com/google/jax/pull/9544/commits/cb732323f376a26cf88e177a96ebd955074acbfc) and may be used in calculating the matrix logarithm ( http://eprints.maths.manchester.ac.uk/1851/). It...
Can you see if Eigen's implementation agrees with wolfram alpha? Example [here](https://www.wolframalpha.com/input?i=schur+decomposition&assumption=%7B%22F%22%2C+%22SchurDecompositionCalculator%22%2C+%22theMatrix%22%7D+-%3E%22%7B%7B5.4%2C4.0%2C7.7%7D%2C%7B3.5%2C-0.7%2C2.8%7D%2C%7B-3.2%2C5.1%2C0.8%7D%7D%22&assumption=%7B%22C%22%2C+%22schur+decomposition%22%7D+-%3E+%7B%22Calculator%22%7D)
