Re: [R] log likelihood and deviance

2010-06-06 Thread Arnaud Le Rouzic
Hi, 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) logLik(model1) model2 <- glm(y ~ x, family=gaussian) logLik(mode

[R] log likelihood and deviance

2010-06-05 Thread Yunteng Lao
Hi Prof Brain Ripley, If we know the residual of the model, how could we calculate the Log likelihood? Thanks for your help, Yunteng Lao [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l