[R] retrieving partial residuals of gam fit (mgcv)

Jannis bt_jannis at yahoo.de
Wed Feb 16 13:35:26 CET 2011


Dear list,


does anybody know whether there is a way to easily retrieve the so called "partial residuals" of a gam fit with package mgcv? The partial residuals are the residuals you would get if you would "leave out" a particular predictor and are the dots in the plots created by

plot(gam.object,residuals=TRUE)

residuals.gam() gives me whole model residuals and predict.gam(...,type='terms') only gives me the response function and its standard deviation.

I would like to retrieve the values of these residuals as I would like to only plot a random sample of the residuals to avoid overloading the plot (>100000 data points).


Thanks a lot in advance
Jannis





More information about the R-help mailing list