Um exemplo que vem à mente é um estimador do GLS que considera as observações de maneira diferente, embora isso não seja necessário quando as suposições de Gauss-Markov são cumpridas (que o estatístico pode não saber ser o caso e, portanto, aplicar ainda aplicar o GLS).
Considere o caso de uma regressão de yi , i=1,…,n em uma constante para ilustração (facilmente generalizada para estimadores gerais de GLS). Aqui, assume-se que {yi} é uma amostra aleatória de uma população com μ média e variância σ2 .
Então, sabemos que OLS é apenas β = ˉ y , a média da amostra. Para enfatizar o ponto que cada observação é ponderada com o peso de 1 / n , esta escrever como
β = n Σ i = 1 1β^=y¯1/nβ^=∑i=1n1nyi.
Var(β^)=σ2/n .
β~=∑i=1nwiyi,
∑iwi=1E(∑i=1nwiyi)=∑i=1nwiE(yi)=∑i=1nwiμ=μ.
Its variance will exceed that of OLS unless wi=1/n for all i (in which case it will of course reduce to OLS), which can for instance be shown via a Lagrangian:
L=V(β~)−λ(∑iwi−1)=∑iw2iσ2−λ(∑iwi−1),
with partial derivatives w.r.t. wi set to zero being equal to 2σ2wi−λ=0 for all i, and ∂L/∂λ=0 equaling ∑iwi−1=0. Solving the first set of derivatives for λ and equating them yields wi=wj, which implies wi=1/n minimizes the variance, by the requirement that the weights sum to one.
Here is a graphical illustration from a little simulation, created with the code below:
EDIT: In response to @kjetilbhalvorsen's and @RichardHardy's suggestions I also include the median of the yi, the MLE of the location parameter pf a t(4) distribution (I get warnings that In log(s) : NaNs produced
that I did not check further) and Huber's estimator in the plot.
We observe that all estimators seem to be unbiased. However, the estimator that uses weights wi=(1±ϵ)/n as weights for either half of the sample is more variable, as are the median, the MLE of the t-distribution and Huber's estimator (the latter only slightly so, see also here).
That the latter three are outperformed by the OLS solution is not immediately implied by the BLUE property (at least not to me), as it is not obvious if they are linear estimators (nor do I know if the MLE and Huber are unbiased).
library(MASS)
n <- 100
reps <- 1e6
epsilon <- 0.5
w <- c(rep((1+epsilon)/n,n/2),rep((1-epsilon)/n,n/2))
ols <- weightedestimator <- lad <- mle.t4 <- huberest <- rep(NA,reps)
for (i in 1:reps)
{
y <- rnorm(n)
ols[i] <- mean(y)
weightedestimator[i] <- crossprod(w,y)
lad[i] <- median(y)
mle.t4[i] <- fitdistr(y, "t", df=4)$estimate[1]
huberest[i] <- huber(y)$mu
}
plot(density(ols), col="purple", lwd=3, main="Kernel-estimate of density of OLS and other estimators",xlab="")
lines(density(weightedestimator), col="lightblue2", lwd=3)
lines(density(lad), col="salmon", lwd=3)
lines(density(mle.t4), col="green", lwd=3)
lines(density(huberest), col="#949413", lwd=3)
abline(v=0,lty=2)
legend('topright', c("OLS","weighted","median", "MLE t, 4 df", "Huber"), col=c("purple","lightblue","salmon","green", "#949413"), lwd=3)