[R] Problems using "lm" in combination with "predict"

"Maja Schröter" maja.schroeter at gmx.de
Sat Aug 4 12:02:41 CEST 2007

Hello everybody,

I'm trying to predict a linear regression model but it does not work.

My Model: y = Worktime + Vacation + Illnes + Bankholidays

My modelmatrix is of dimension  28x4

Then I want to make use of the function predict because there confidence.intervals are include.

My idea was:

mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays)


But I always get the message:

'newdata' had 1 rows but variable(s) found have 28 rows

What can I do?



Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

More information about the R-help mailing list