Re: [R] predict.lm with matrix as newdata

2008-02-18 Thread Uwe Ligges
Marlin Keith Cox wrote: > Thank you in advance for helping me with this. > I included a part of the actual data. The result of pred.est and > pred.est1are different, but they should be identical. For > pred.est, I entered the slope and y intercept and received a value for each > individual numb

Re: [R] predict.lm with matrix as newdata

2008-02-18 Thread Marlin Keith Cox
Thank you in advance for helping me with this. I included a part of the actual data. The result of pred.est and pred.est1are different, but they should be identical. For pred.est, I entered the slope and y intercept and received a value for each individual number in the matrix (Z). For pred.est1

Re: [R] predict.lm with matrix as newdata

2008-02-16 Thread Uwe Ligges
Marlin Keith Cox wrote: > Z is a matrix and when I run the following line, it creates a prediction > estimate using each column, how can I get it an estimate for each individual > number. I have tried changing Z to a data.frame, but this does not do it > either. > > model.lm<-lm(w~x) > > pred.

[R] predict.lm with matrix as newdata

2008-02-15 Thread Marlin Keith Cox
Z is a matrix and when I run the following line, it creates a prediction estimate using each column, how can I get it an estimate for each individual number. I have tried changing Z to a data.frame, but this does not do it either. model.lm<-lm(w~x) pred.est <- predict.lm(model.lm, data.frame(x=Z