Dependent variable: Can it be a derived quantity?

It’s completely fine to specify priors for transformations of parameters & data, are you receiving some kind of error when you do so?

This specification should compile without issue:

(events[i] / pop[i]) ~ lognormal(mu[i], sigma)

The only situations where you need to be careful are when a non-linear transformation is applied, in which case you would need to add a jacobian adjustment.

For more information on this, see this forum post and this section of the Stan manual

EDIT:

If you want to specify a prior on (events[i] / pop[i]) and also use that quantity elsewhere in the model, you just need to construct it in the transformed parameters block:

transformed parameters {
  vector[N] rate = events ./ pop;
}

model {
  rate ~ lognormal(mu, sigma);
}
3 Likes