[R] Problems with lm()

From: Chibisi Chima-Okereke <chibco_at_gmail.com>
Date: Tue, 08 Jul 2008 01:09:05 +0100


Dear all,

I am trying to fit a multiple linear regression model to a table of data. My data.frame is like this ...

fit.data <- data.frame(y, x1, x2, x3, x4, x5, x6), then I use the linea regression command ...

lm(formula = y ~ x1 + x2 + x3 + x4 + x5 + x6, data = fit.data)

however, for some tables the data in column x1 is equal to -x2, so I get NA values for both coefficients of x1 and x2. I need to have real fitted coefficients for all the parameters or the physical meaning of the parameters is lost. Is there any way of forcing R to fit all the parameters? I have seen the contrast option but I don't really understand it (I am not a statistician) so I would be greatful if anyone could explain that.

Kind Regards

Chibisi

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 08 Jul 2008 - 00:18:11 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 Tue 08 Jul 2008 - 01:31:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive