Jacobian adjustment

Dear users,

I would like to know if Jacobian adjustment is required for the following situation.
my model has parameters whose “typical” values are either very small and very large. Following through Stans manual about prior choice, https://github.com/stan-dev/stan/wiki/Prior-Choice-Recommendations, what I have been doing is to convert both large and small parameters on a unit scale. For example, if the typical value of beta is 3.8x10^-10, and the typical value of eta is 20000, then these are changed into

beta_raw = log(beta/3.8x10^-10) and 
eta_raw = log(eta/20000)

In Stan code these are coded as

parameters{ 
 real beta_raw;
real eta_raw;
}

transformed parameters{
 real<lower = 0> beta;
  real<lower = 0> eta;

 beta = exp(beta_raw)*3.8e-10;
  eta = exp(eta_raw)*2e4;
}

model{
    beta_raw ~ normal(0, 1); 
     eta_raw ~ normal(0,1);
}

My question is do I need to include Jacobian adjustment for beta_raw and eta_raw?

Reading through Stan’s documentation about Change of variables and reparametrisations , http://mc-stan.org/docs/bayes-stats-stan/change-of-variables-chapter.html, I could not figure out when to use Jacobian adjustment or when to not use it.

Thanks

No because the priors are appropriately put on beta_raw and eta_raw. But you should do a bunch of simulations to see if the implied prior distribution of beta and eta have reasonable dispersion and skewness.

Thanks @bgoodri.

Another clarification. Suppose instead of the above transformation for eta, I use lognormal distribution for eta, do I include jacobian adjustment. Specifically, the model is now coded as

parameters{ 
real beta_raw;
real<lower =0> eta;
}

transformed parameters{
 real<lower = 0> beta; 

beta = exp(beta_raw)*3.8e-10;
}

model{
beta_raw ~ normal(0, 1);
eta ~ lognormal(log(20000, 1)
}

With the lognormal distribution for eta, posterior mean for eta is close to its true value. However, I wasn’t sure if jacobian adjustment is required for this case or not.

Thanks

If you priors pertain to things in the parameters block then no Jacobian adjustment is needed. Conversely, if your priors pertain to something not in the parameters block, then a Jacobian adjustment is needed unless it is constant in which case you don’t need it for inference but would need it for things like Bayes Factors.

Thanks very much @bgoodri.
That explanation cleared my confusion.