[R] compare linear regressions

Holger Taschenberger Holger.Taschenberger at mpi-bpc.mpg.de
Tue Nov 8 15:53:57 CET 2011


Thank you. I was confused because the output of the line "summary(lm(formula
=..." reads:

"Coefficients: (1 not defined because of singularities)",

which did not look like a normal message (which can safely be ignored)
to me.

--Holger

On Tue, 8 Nov 2011 15:06:28 +0100
Peter Konings <peter.l.e.konings at gmail.com> wrote:

> On Tue, Nov 8, 2011 at 2:52 PM, Holger Taschenberger <
> Holger.Taschenberger at mpi-bpc.mpg.de> wrote:
> <snip>
> 
> > summary(lm(formula = y ~ x - 1 + x:g, dta))
> > ##################
> > I assume that the last line is the correct way to specify a linear model
> > without intercept. But I'm not certain about that. Can someone please
> > confirm?
> 
> 
> Yes, that's true. See chapter 11 of the "Introduction To R" manual that was
> installed with R for an overview of model specification in R.
> 
> HTH
> Peter.



More information about the R-help mailing list