Function to compute quantile and response residuals.
# S3 method for bamlss residuals(object, type = c("quantile", "response"), nsamps = NULL, ...) # S3 method for bamlss.residuals plot(x, which = c("hist-resid", "qq-resid"), spar = TRUE, ...)
An object of class
The type of residuals wanted, possible types are
If the fitted
Object returned from function
Should a histogram with kernel density estimates be plotted or a qq-plot?
Should graphical parameters be set by the plotting function?
Response residuals are the raw residuals, i.e., the response data minus the fitted distributional
mean. If the
bamlss.family object contains a function
$mu(par, …), then
raw residuals are computed with
y - mu(par) where
par is the named list of fitted
values of distributional parameters. If
$mu(par, ...) is missing, then the fitted values
of the first distributional parameter are used.
Randomized quantile residuals are based on the cumulative distribution function of the
bamlss.family object, i.e., the
$p(y, par, ...) function.
A vector of residuals.
Dunn P. K., and Smyth G. K. (1996). Randomized Quantile Residuals. Journal of Computational and Graphical Statistics 5, 236-244.