| residuals.slmfit {sptotal} | R Documentation | 
Extract Model Residuals from an slmfit object.
Description
Extract Model Residuals from an slmfit object.
Usage
## S3 method for class 'slmfit'
residuals(object, type = "raw", cross.validation = FALSE, ...)
Arguments
| object | a  | 
| type | residual type:  | 
| cross.validation | a logical ( | 
| ... | further arguments passed to or from other methods. | 
Value
a vector of residuals, consisting of each observed response/density minus the estimated mean, or, in the case of cross-validation, the observed response/density minus the leave-one-out-cross-validation prediction.
Examples
data(exampledataset) ## load a toy data set
slmobj <- slmfit(formula = counts ~ pred1 + pred2, data = exampledataset,
xcoordcol = 'xcoords', ycoordcol = 'ycoords', areacol = 'areavar')
residuals(slmobj)
residuals(slmobj, cross.validation = TRUE)
[Package sptotal version 1.0.1 Index]