Hi!

For example if "data" is the complete dataset with both x and y values:

tempdata = data[complete.cases(data[,1:2]),] # Regression data
model = lm(y~x, data = tempdata)               # Linear model

>From this you can calculate the regression value of the missing values.

Hope this helped!
Regards,
Chris




--
View this message in context: 
http://r.789695.n4.nabble.com/regression-imputation-in-R-tp4675667p4675677.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.

Reply via email to