Scaling factor for MAD_SD in rstanarm

rstanarm documentation explains that posterior uncertainty is estimated as an approximation to the posterior standard deviation based on a scaling the MAD (median absolute deviation around the median).

I’m unable to find the scaling factor either in the documentation or in the code. Instead, the SE estimates seem to be based simply on the MAD without any scaling factor (comparing the output of the se() function and applying the mad() function to the simulations).

How the scaling factor for the MAD should be computed?

mad() has a default scaling factor of 1.4826 \approx \frac{1}{\Phi^{-1}\left(0.75\right)} as explained in help(mad).

Thanks, Ben! I thought rstanarm used a custom scaling factor given that it is approximating the SD of (potentially) non-normal posterior distributions.

On a side note, wouldn’t a normal approximation scaling factor for the MAD underestimate posterior uncertainty (as measured by the posterior SD) for skewed posterior distributions?

You could say that MAD_SD is not a great estimator of the standard deviation if the posterior margin is not normal, but it is still 1.4826 times the median absolute deviation from the median. But if the posterior margin is not normal, then its standard deviation is an incomplete measure of the uncertainty anyway. As always, the raw draws are available via as.matrix and can be plotted with the functions in the bayesplot package and the print and summary methods are intended for a quick sketch of posterior margins.