Re: [R] Predicting response from fitted linear model with incomplete new sample data

2013-12-18 Thread Rolf Turner
As far as I can discern, your question makes no sense at all. Suppose you *know* that y = 2 + 3*x1 + 4*x2. Now what should you predict when x1 = 6 (with x2 "missing"/unknown)? See fortune("magic"). On 19/12/13 07:18, Chris Wilkinson wrote: I would like to predict a new response from a fitte

[R] Predicting response from fitted linear model with incomplete new sample data

2013-12-18 Thread Chris Wilkinson
I would like to predict a new response from a fitted linear model where the new data is a single case with a missing value. My reading of the help on predict() is inconclusive on whether this is possible. Leaving out the missing value or setting it to NA both fail but differently, see example code