Hello everyone,

I would like to a linear regression with the following code. 
 lm(a[,"fquamsci"]~., data=a)

a is a list with class "mts" "ts" , and  "fquamsci" is the name of the
response variable in a. I would like to do a linear regression of "fquamsci"
to the rest of the variables. But it turns out the "fquamsci" is also
included in the explanatory variables. I tried the following, it is quite
strange that it does not work as well.

 lm(a[,"fquamsci"]~.-a[,"fquamsci"], data=a)

Could anyone give me some advice?
Many thanks

-- 
View this message in context: 
http://www.nabble.com/Linear-Regression-tf4764346.html#a13626039
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to