Re: [R] predict.loess and NA/NaN values

2010-08-30 Thread Philipp Pagel
On Mon, Aug 30, 2010 at 01:50:03PM +0100, Prof Brian Ripley wrote: > The underlying problem is your expectations. > > R (unlike S) was set up many years ago to use na.omit as the > default, and when fitting both lm() and loess() silently omit cases > with missing values. So why should prediction

Re: [R] predict.loess and NA/NaN values

2010-08-30 Thread Philipp Pagel
> What you can do is patch the code to add the NAs back after the > Prediction step (which many predict() methods do). Thanks Andy for your hints and especially for digging into the problem like this! I have, in the meantime, written a simple wrapper around predict.loess that fills in the NAs, w

Re: [R] predict.loess and NA/NaN values

2010-08-30 Thread Prof Brian Ripley
The underlying problem is your expectations. R (unlike S) was set up many years ago to use na.omit as the default, and when fitting both lm() and loess() silently omit cases with missing values. So why should prediction from 'newdata' be different unless documented to be so (which it is nowad

Re: [R] predict.loess and NA/NaN values

2010-08-27 Thread Liaw, Andy
From: Philipp Pagel > > In a current project, I am fitting loess models to subsets of data in > order to use the loess predicitons for normalization (similar to what > is done in many microarray analyses). While working on this I ran into > a problem when I tried to predict from the loess models a

[R] predict.loess and NA/NaN values

2010-08-27 Thread Philipp Pagel
Hi! In a current project, I am fitting loess models to subsets of data in order to use the loess predicitons for normalization (similar to what is done in many microarray analyses). While working on this I ran into a problem when I tried to predict from the loess models and the data conta