Next, we plot the estimated effects using posterior median (\(\mu_d\))
versus the true effects (\(\mu\)), colored according to the sampling
standard deviation, with high standard deviation being black and low
standard deviation being red. Posterior medians of observations with
larger standard deviation are closer to zero. Intuitively, larger
standard deviation implies more uncertainty and less information and,
thus, posterior estimates will be closer to the prior.

Now we demonstrate the performance of EbayesThresh with heterogeneous
variance using posterior mean/median with different proportions of
null effects (with constraints on threshold). Consider a data sequence
of 2,000 observations with \(m\) null effects and \(2,000 - m\) effects
drawn from \(N(0, 1)\), in which \(m = 0, 10, 80, 640\), and \(2000\). Each true
effect \(\mu_i\) is observed with noise drawn from a normal distribution
\(N(0, s_i^2)\), with \(s_i^2 \sim \chi^2_1\).

The estimation results of \(m = 0, 10, 80, 640\), and \(2000\)
(corresponding to proportion \(0, 0.005, 0.04, 0.32\) and \(1\)) are
plotted every 10 data points ( \(10^{th}, 20^{th} \cdots\) of the
observations ) versus the true effects. Mean squared error (MSE) and
mean absolute error (MAE) are shown in each panel. We can see that
posterior estimates of observations with larger standard deviation are
closer to zero in almost all the panels.

Now, we compare MSE and MAE using posterior mean and median
respectively over different proportions of null effects with different
measures of standard deviation. Three different standard deviations
are passed to the model: i) homogeneous standard deviation measured by
median absolute deviation (MAD) of the observations, ii) homogeneous
standard deviation measured by mean of the true standard deviations,
and iii) the true heterogeneous standard deviations. For each
proportion of null effects and each standard deviation, we calculate
MSE and MAE 10 times and then take the average.