The problem of constant SD for likelihood of Gaussian distribution

Imagine that you have a Gaussian distribution N(mean, sd) and you search for a model f(xi) that explained the best your observed data ni. A common solution is to use maximum likelihood and then minimizing -Ln L using dnorm(ni, mean=f(xi), sd=SD, log=TRUE) with SD being fitted.

However, doing this, you give huge weight to the large values ni. Imagine n1=1000 and n2=10. The model predicting n from the x gives a 10% error prediction. Then f(x1)=1100 and f(x2)=11.

The -ln likelihood of 1 and 2 are:
L1 <- -dnorm(x=n1, mean=f(x1), sd=SD, log=TRUE)
and
L2 <- -dnorm(x=n2, mean=f(x2), sd=SD, log=TRUE)

The minimum for L1 is 6.024496 with SD=102 and for L2 is 1.418939 with SD=1.

Then contribution of L1 in the total likelihood is much higher than contribution of L2... the values with higher figures drive the fit.

This is normal because the absolute deviation is higher and the model suppose no heteroskedasticity. But heteroskedasticity is very very often observed.

So it is better to model SD as a function of ni; something like SD*ni.

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04