[R] regression imputation in R
Chris89
chrisege at stud.ntnu.no
Mon Sep 9 14:06:20 CEST 2013
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.
More information about the R-help
mailing list