View source: R/residuals.slmfit.R
residuals.slmfit | R Documentation |
slmfit
object.Extract Model Residuals from an slmfit
object.
## S3 method for class 'slmfit'
residuals(object, type = "raw", cross.validation = FALSE, ...)
object |
a |
type |
residual type: |
cross.validation |
a logical ( |
... |
further arguments passed to or from other methods. |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.