[R] Predictions with missing inputs

tonitogomez manuel.gomes at lshtm.ac.uk
Thu Apr 25 18:12:58 CEST 2013


Hi Bill,
Very clear response.
How about when the missing values are on the response variable being
predicted (y)? That is, the model is fitted only to complete cases, but then
I want to have predictions for all individual y (including those missing).
Can I use the mean for that variable 'y'?

EXAMPLE:
mynewdata <- mydata
mynewdata$y<-mean(mydata$y)
mypred <- predict(mymodel, mynewdata) 

Thanks,
Manuel



--
View this message in context: http://r.789695.n4.nabble.com/Predictions-with-missing-inputs-tp3302303p4665411.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list