[R] building a regression model
dada
paxkn at nottingham.ac.uk
Sat Jan 5 00:53:40 CET 2013
Hi
I am trying to build a regression model. My data looks like this:
A B C D E
1 1 1 2.57 5
2 0 0 1.64 3
0 5 1 4.8 1
1 3 0 3.56 168
1 1 1 2.13 1
0 3 1 5 168
2 0 0 7.75 28
4 0 2 2.85 168
3 0 1 1.89 6
1 1 1 2.33 3
3 2 2 1.77 168
1 0 0 1.38 0.04
0 6 1 4.57 168
2 2 2 2.86 1
3 1 1 4.11 168
3 0 2 3 84
1 1 1 2.5 56
where E is a response variable and A, B, C, D are predictor variables. Below
are commands which I enter in R:
str (mydata)
mydata.lm = lm (E ~ 1, data = mydata) # to create a blank model
add1(mydata.lm, mydata, test='F') # to add the best predictor variable to
the blank model
However at this point the message appears:
Warning messages:
1: In model.matrix.default(Terms, m, contrasts.arg = object$contrasts) :
the response appeared on the right-hand side and was dropped
2: In model.matrix.default(Terms, m, contrasts.arg = object$contrasts) :
problem with term 4 in model.matrix: no columns are assigned
What does it mean ? Could you please help ?
--
View this message in context: http://r.789695.n4.nabble.com/building-a-regression-model-tp4654701.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list