residuals.bootstrap {analogue} | R Documentation |
residuals
is a generic function which extracts
model residuals from objects returned by modeling
functions. residuals.bootstrap.mat
is a residuals
method
for mat
models.
The abbreviated form of this function is resid
.
## S3 method for class 'bootstrap': residuals(object, which = c("apparent", "bootstrap"), ...)
object |
an object of class bootstrap . |
which |
character; which set of residuals to return, the apparanet residuals or the residuals of the bootstrap-derived estimates? |
... |
arguments pass to or from other methods. |
A list containg the requested residuals and metadata, with the following components:
apparent |
residuals for the MAT-estimated model. |
bootstrap |
residuals for the bootstrapped MAT model. |
k |
numeric; indicating the size of model used in estimates and predictions. |
n.boot |
numeric; the number of bootstrap samples taken. |
auto |
logical; whether "k" was choosen automatically or
user-selected. |
weighted |
logical; whether the weighted mean was used instead of the mean of the environment for k-closest analogues. |
Gavin L. Simpson
## continue the RLGH example from ?join example(join) ## fit the MAT model using the squared chord distance measure swap.mat <- mat(swapdiat, swappH, method = "SQchord") ## bootstrap training set swap.boot <- bootstrap(swap.mat, k = 10, n.boot = 1000) ## residuals resid(swap.boot) # uses abbreviated form