Re: [R] compare linear regressions

2011-11-08 Thread Jeff Newmiller
Just because your model specification is valid does not mean your data can be analyzed using that particular model specification. --- Jeff NewmillerThe . . Go Live... DCN:Basi

Re: [R] compare linear regressions

2011-11-08 Thread Holger Taschenberger
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 wrote: > O

Re: [R] compare linear regressions

2011-11-08 Thread R. Michael Weylandt
Yes, adding "-1" or "+0" both return a lm without an intercept term. Michael On Tue, Nov 8, 2011 at 8:52 AM, Holger Taschenberger wrote: > Hi, > >        I'm trying to compare two linear regressions. I'm using the > following approach: > ## > xx<-1:100 > df1 <- data.frame(x = xx,

[R] compare linear regressions

2011-11-08 Thread Holger Taschenberger
Hi, I'm trying to compare two linear regressions. I'm using the following approach: ## xx<-1:100 df1 <- data.frame(x = xx, y = xx * 2 + 30 + rnorm(n=length(xx),sd=10), g = 1) df2 <- data.frame(x = xx, y = xx * 4 + 9 + rnorm(n=length(xx),sd=10), g = 2) dta <- rbind(df1, df2