On 25.04.2013 18:12, tonitogomez wrote:
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)
Err, if y is your response, you do not need them for prediction... Best, Uwe Ligges
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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.