20.3 Unused parameters

A warning is generated when a parameter is declared but does not have any effect on the program. This is determined by checking whether the value of the target variable depends in any way on each of the parameters.

For example, consider the following program.

parameters {
  real a;
  real b;
}
model {
  a ~ normal(1, 1);
}

a participates in the density function but b does not.

Pedantic mode produces the following warning.

Warning:
  The parameter b was declared but was not used in the density calculation.