Re: [R] log likelihood and deviance

From: Arnaud Le Rouzic <>
Date: Sun, 06 Jun 2010 10:02:45 +0200

> If we know the residual of the model, how could we calculate the Log
> likelihood?
It depends on the model (lm? glm? nls?). Why not using directly the logLik function?

x <- rnorm(100, 10)
y <- rnorm(100, 10)
model1 <- lm(y ~ x)

model2 <- glm(y ~ x, family=gaussian)
model3 <- glm(y ~ x, family=Gamma)


Arnaud. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 06 Jun 2010 - 10:38:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Jun 2010 - 11:10:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive