You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This came up in a discussion on the Stan discourse page, so I just wanted to give a heads up.
In your getting started guide you state that
Note that hyper (group) mean parameters are indicated by mu_PARAMETER (e.g., mu_xi, mu_ep, mu_rho).
and in the models you compute those as mu_PARAMETER = Phi_approx(mu_pr[PARAMETER_INDEX]) * scaling; in the generated quantities block. However, this will give you an estimate of the posterior median of the group parameter, not the posterior mean.
If Y = f(X) and f is non-linear, then E[Y] =/= f(E[X]), as E[f(X)] =/= f(E[X]) per Jensen's inequality.
If the underlying distribution (for X) is symmetric, mu_PARAMETER (i.e. f(E[X])) will the parameter for the posterior median of the group distribution.
Cheers!
The text was updated successfully, but these errors were encountered:
Hi @maxmantei, thanks for the info! Can you link to the discourse discussion?
I guess I'm just wondering if this applies in our case. We are estimating the parameters using this scaling in the transformed parameters block, and then mirroring this in the generated quantities block. So, my understanding is that the expectation used in the likelihood is the same as in the generated quantities (i.e. we are not just transforming the parameter after fitting the model).
Anyway, happy to look into this if it's indeed a problem!
Hi!
This came up in a discussion on the Stan discourse page, so I just wanted to give a heads up.
In your getting started guide you state that
and in the models you compute those as
mu_PARAMETER = Phi_approx(mu_pr[PARAMETER_INDEX]) * scaling;
in the generated quantities block. However, this will give you an estimate of the posterior median of the group parameter, not the posterior mean.If Y = f(X) and f is non-linear, then E[Y] =/= f(E[X]), as E[f(X)] =/= f(E[X]) per Jensen's inequality.
If the underlying distribution (for X) is symmetric,
mu_PARAMETER
(i.e. f(E[X])) will the parameter for the posterior median of the group distribution.Cheers!
The text was updated successfully, but these errors were encountered: