This is an old version, view current version.

20.1 Distribution argument and variate constraint issues

When an argument to a built-in distribution certainly does not match that distribution’s specification in the Stan Functions Reference, a warning is thrown. This primarily checks if any distribution argument’s bounds at declaration, compile-time value, or subtype at declaration (e.g. simplex) is incompatible with the domain of the distribution.

For example, consider the following program.

parameters {
  real unb_p;
  real<lower=0> pos_p;
model {
  1 ~ poisson(unb_p);
  1 ~ poisson(pos_p);

The parameter of poisson should be strictly positive, but unb_p is not constrained to be positive.

Pedantic mode produces the following warning.

Warning at 'ex-dist-args.stan', line 6, column 14 to column 19:
  A poisson distribution is given parameter unb_p as a rate parameter
  (argument 1), but unb_p was not constrained to be strictly positive.