Most of these are going to have to be built into the parser
code itself to do it right, especially given the creative
syntax we see from users.
I don't know if the "sigma..." thing is worth doing. Not
many of our users use "sigma" or "sigma_foo" the way Andrew does. And
presumably you meant should have <lower=0> in its declaration?
It probably got lost in the markdown.
Do we also flag normal(0, 1000) and other attempts at very
diffuse priors?
The problem with a lot of this is that we'll have to be
doing simple blind matching. Most of our users don't
use "sigma" (or "tau" the way Andrew does). Nor do they
follow the sigma_foo standard---it's all over the place.
We can pick up literal values (and by literal, I mean
it's a number in the code). We won't be able to pick up
more complex things like gamma(a, b) where a < 1 and b < 1,
because that's a run-time issue, not a compile-time issue,
for instance if a and b are data.
Should we also flag <lower=A> if A != 0 or A!= -1? (Again,
we'll be able to pick up literal numbers there, not more
complex violations).
Conditionals (if-else) are only problematic if the conditions
depend on parameters.
Everyone wants to do more complicated things, like make sure
that if a variable is given a distribution with a bound that the
bound's declared in the parameters. So no:
real alpha;
alpha ~ lognormal(...)
because then alpha isn't well defined. These things are going to
be a lot of work to track down and we'll again only be able to pick
out direct cases like this.
- Bob
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-dev+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
>