
8.10 Consensus Means* 307
3,3,3,3,3,3,3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4),
sel = c(
115.7, 113.5, 103.3, 119.1, 114.2, 107.3, 91.2, 104.4,
108.6, 109.1, 107.2, 111.5, 100.6, 106.3, 105.9, 109.7,
111.1, 107.9, 107.9, 107.9,
107.6, 107.26,109.7, 109.7, 108.5, 106.5, 110.2, 108.3,
110.5, 108.5, 108.8, 110.1, 109.4, 112.4,
118.7, 109.7, 114.7, 105.4, 113.9, 106.3, 104.8, 106.3),
k=4, n=42)
INITS
list( mu=1, tau=1, prec=c(1,1,1,1), theta=c(1,1,1,1) )
mean sd MC error val2.5pc median val97.5pc start sample
mu 108.8 0.6499 0.003674 107.6 108.9 110.0 5001 500000
si2 0.7252 9.456 0.02088 1.024E-4 0.01973 4.875 5001 500000
theta[1] 108.8 0.8593 0.003803 107.0 108.9 110.5 5001 500000
theta[2] 108.7 0.6184 0.004188 107.2 108.7 109.7 5001 500000
theta[3] 108.9 0.4046 0.00311 108.1 108.9 109.7 5001 500000
theta[4] 108.9 0.7505 0.003705 107.6 108.9 110.7 5001 500000
Next, we compare the Bayesian estimator with the classical Graybill–Deal
and Schiller–Eberhardt estimators, 108.8892 and 108.7703, respectively. The
Bayesian estimator falls between the two classical ones. A 95% credible set for
the consensus mean is [107.6, 110].
lab1=[115.7, 113.5, 103.3, 119.1, 114.2, 107.3, 91.2, 104.4];
lab2=[108.6, 109.1, 107.2, 111.5, 100.6, 106.3, 105.9, 109.7,...
111.1, 107.9, 107.9, 107.9];
lab3=[107.6, 107.26,109.7, 109.7, 108.5, 106.5, 110.2, 108.3,...
110.5, 108.5, 108.8, 110.1, 109.4, 112.4];
lab4=[118.7, 109.7, 114.7, 105.4, 113.9, 106.3, 104.8, 106.3];
m = [mean(lab1) mean(lab2) mean(lab3) mean(lab4)];
s = [std(lab1) std(lab2) std(lab3) std(lab4) ];
ni=[8 12 14 8]; k=length(m);
%Graybill-Deal Estimator
wei = ni./s.^2; %weights
m
_
gd = sum(m .
*
wei)/sum(wei) %108.8892
%Schiller-Eberhardt Estimator
z = sort(m);
sb2 = (z(k)-z(1))^2/12;
wei = 1./(s.^2./ni + sb2);%weights
m
_
se = sum(m .
*
wei)/sum(wei) %108.7703
Borrowing Strength and Vague Priors. As popularly stated, this model
allows for borrowing strength in the estimation of both the means
θ
i
and the