[R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Lars Bergemann
Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I was unable to find any help on how to do that. Could you help me and tell me what to do? Or tell me where to find

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Jeff Xu
Hi Lars, Using the definition of Likelihood-ratio test is straightforward, Jeff Lars Bergemann wrote: Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Emmanuel Charpentier
Le lundi 13 juillet 2009 à 13:04 +0200, Lars Bergemann a écrit : Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I was unable to find any help on how to do

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Charles C. Berry
On Mon, 13 Jul 2009, Jeff Xu wrote: Hi Lars, Using the definition of Likelihood-ratio test is straightforward, To which I would add, following the instructions in the _posting guide_ is equally straightforward. viz help.search(loglikelihood) takes you to

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Jorge Ivan Velez
Dear Lars, One way would be anova(model1, model2) See ?anova for more information. HTH, Jorge On Mon, Jul 13, 2009 at 7:04 AM, Lars Bergemann lars.bergem...@hotmail.comwrote: Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model