Parametrization/scaling outputs in stan

I have 3 questions.

  1. Is it better to have
    vector[N] parameters~normal(0,hyperparameter),
    vector[N] z~normal(0,1)

  2. Does it make sense to have
    real parameter~normal(0, sigma)
    real z~normal(0,1)

  3. What about scaling outputs for nonlinear regression in stan?

Thanks for any advice.

This is the distinction between the centered and non-centered parameterizations of hierarchical models. The short answer is it depends on how much information there is in the data to pin down the parameters, but I often find the non-centered (your second option) to be a good default. More details:

In general it’s easier for the sampler for parameters to be on similar scales, so I would say it’s usually better to do the second option and scale them up by different amounts, with the raw parameters N(0,1).

I think the advice that parameters be on similar scales applies in general, so same for the non-linear case.


Thanks. A follow up question. If I have both continuous and binary inputs. I don’t scale binary inputs and scale continuous inputs by 2sd?