[R] predict.lm with NAs

Martin Batholdy batholdy at googlemail.com
Thu Apr 15 03:06:37 CEST 2010


Hi,

I wanted to use the predict.lm() function to compare the empirical data with the predicted values.
The problem is that I have NAs in my data.

I wanted to cbind my data.frame with the empirical values with the vector I get from predict.lm.
But they don't have the same length because predict.lm just skip NA-predictions.

Is there a way to get a vector with predicted values of the same length as the empirical values (with NAs)?


thanks!



More information about the R-help mailing list