Artificial hard upper bounds are almost always a bad idea.
If you guess wrong and there's any measurable mass above
the bound, you essentially get both biased estimates and
a computational problem as you try to run off to infinity
on the unconstrained scale. But if the data's normal,
that's exactly what your estimate of nu is going to try to do.
Someone else probably knows how much data we need to estimate
nu, but you may want to do some experiments yourself by
simulating from a student t with various nu and seeing what
you get for estimates.
I'm also not sure what it means to have nu < 1. It seems
like the Cauchy is a reasonable lower-bound on fatness of
tails. Please let me know if that's not right! In Stan,
that constraint would be:
parameters {
real<lower = 1> nu;
But then it might also make sense to put a prior
on 1 / nu and transform (even a uniform) and transform:
parameters {
real<lower = 0, upper = 1> inv_nu;
...
transformed parameters {
real<lower = 1> nu = inv(inv_nu);
...
I never got a proper stats education, so I have to work out what we
get from first principles with the Jacobian adjustment to the transformed
uniform:
If
X ~ uniform(0, 1);
and
Y = 1 / X
then
Y in (1, infinity)
and
p_Y(y) = |d/dy 1/y| uniform(1/y | 0, 1)
= 1 / y^2
Now that looks familiar.
https://en.wikipedia.org/wiki/Pareto_distribution
It's just Pareto(1, 1). And the Wikipedia neatly summarizes that
if Y ~ Pareto(1, 1), then
Pr[Y > y] = 1 / y
In Stan you can code the Pareto up directly:
parameters {
real<lower = 1> nu;
model {
nu ~ pareto(1, 1);
No idea if that's a good idea, but it let me do some math
exercises on our mailing list. Hope I didn't botch something.
- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> To post to this group, send email to
stan-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.