Re: [R] lm predictions for rows with missing y values

2014-04-15 Thread Rui Barradas
Hello, I believe you want na.action = na.exclude. lmnew <- lm(newy ~ newx,newdata,na.action=na.exclude) na.action can not be set to TRUE or FALSE. From the help page ?lm na.action a function which indicates what should happen when the data contain NAs. The default is set by the na.ac

Re: [R] lm predictions for rows with missing y values

2014-04-15 Thread Bert Gunter
Yes. I believe what you're looking for is: See ?predict.lm and what it has to say about the na.action=na.exclude argument to lm. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wis

[R] lm predictions for rows with missing y values

2014-04-15 Thread Mast, Brent D
Hi. I'm trying to produce lm fitted values and standard errors for cases with missing y values. I know how to compute these myself with matrix algebra, but I'm wondering if there is an appropriate na.action in the lm function to do this. Here is some simple code where I use na.action=NULL with