Skip to content
Prev 33816 / 398513 Next

logLik.lm()

On Wednesday 25 June 2003 20:23, Edward Dick wrote:

            
That is because you are not using the ML estimate of the variance.

sigmaML <- sqrt(mean(residuals(test.lm)^2))
sum(dnorm(y, y.hat, sigmaML, log=T))
# [1] -57.20699

Best,
Z