Description Usage Arguments Details Value Note Author(s) Examples
'residuals' extracts different types of residuals from an object of class 'drc'.
1 2 3 |
object |
an object of class 'drc'. |
typeRes |
character string specifying the type of residual to be returned: raw/working residuals, residuals standardised using the estimated residual standard error, or studentised residuals based on the H matrix of partial derivatives of the model function. |
trScale |
logical value indicating whether or not to return residuals on the transformed scale (in case a Box-Cox transformation was applied). |
... |
additional arguments. |
Standardised residuals are the raw residuals divided by a scale estimate (if available).
Studentised residuals are obtained by dividing by a scale estimate and in addition a correction factor (square root of 1 minus h with h is a diagonal element in the hat matrix).
The raw (also called working) residuals or some kind of scaled residuals extracted from 'object'.
The 'standardised' residuals are available for least squares estimation with or without Box-Cox transformation or variance as a power of the mean.
Christian Ritz
1 2 3 4 5 6 7 8 9 10 11 | ## Fitting a four-parameter log-logistic model
ryegrass.m1 <- drm(rootl ~conc, data = ryegrass, fct = LL.4())
## Displaying the residual plot (raw residuals)
plot(fitted(ryegrass.m1), residuals(ryegrass.m1))
## Using the standardised residuals
plot(fitted(ryegrass.m1), residuals(ryegrass.m1, typeRes = "standard"))
## Overlayering the studentised residuals ... not much of a difference
points(fitted(ryegrass.m1), residuals(ryegrass.m1, typeRes = "student"), col = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.