Re: [R] Linear Model and Missing Data in Predictors

2016-03-15 Thread William Dunlap via R-help
One technique for dealing with this is called 'multiple imputation'. Google for 'multiple imputation in R' to find R packages that implement it (e.g., the 'mi' package). Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Mar 15, 2016 at 8:14 AM, Lorenzo Isella wrote:

Re: [R] Linear Model and Missing Data in Predictors

2016-03-15 Thread Jeff Newmiller
IMHO this is not a question about R... it is a question about statistics whether R is involved or not. As such, a forum like stats.stackexchange.com would be better suited to address this. FWIW I happen to think that expecting R to solve this for you is unreasonable. -- Sent from my phone.

[R] Linear Model and Missing Data in Predictors

2016-03-15 Thread Lorenzo Isella
Dear All, A situation that for sure happens very often: suppose you are in the following situation set.seed(1235) x1 <- seq(30) x2 <- c(rep(NA, 9), rnorm(19)+9, c(NA, NA)) x3 <- c(rnorm(17)-2, rep(NA, 13)) y <- exp(seq(1,5, length=30)) mm<-lm(y~x1+x2+x3) i.e. you try a simple linear