-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
add multiplier keyword to unit vector #3105
Comments
If I'm reading this correctly, I think using the keyword |
From the comment
From the code, Since it's not applied to the parameters idt, |
I'm ok with it just being something simple like What I have above is When The mean of this is |
In https://discourse.mc-stan.org/t/a-better-unit-vector/26989/30 Seth Axen lays out the reasoning for adding an additional parameter which repels values away from 0.
The current implementation is equivalent to
The proposal is to parameterize the unit vector as
where
a >= 0
and is given as amultiplier
keyword. As Seth notes in the post, it corresponds to the chi distribution witha + 1
degrees of freedom. The user would see:Setting
a = 0
is equivalent to what is currently in Stan and will still be the default when the multiplier keyword is not used.How to select
a
?From the same thread the issue manifests with smaller dimension sizes of the unit vector. Heuristically, I'm finding that setting
a = N^(6/N)
whereN
is the dimension of the unit-vector works well.Here's a test model for 2d unit vectors where divergences occur in the current parameterization. When the data size,
M
, is small there are fewer divergences then when it's larger (M > 50
).The data for this can be created as
The text was updated successfully, but these errors were encountered: