residuals.robustbetareg {robustbetareg} | R Documentation |
Residuals Method for robustbetareg Objects
Description
The function provides several types of residuals for the robust beta regression models: Pearson residuals (raw residuals scaled by square root of variance function) and different kinds of weighted residuals proposed by Espinheira et al. (2008) and Espinheira et al. (2017).
Usage
## S3 method for class 'robustbetareg'
residuals(
object,
type = c("sweighted2", "pearson", "weighted", "sweighted", "sweighted.gamma",
"sweighted2.gamma", "combined", "combined.projection"),
...
)
Arguments
object |
fitted model object of class |
type |
character indicating type of residuals to be used. |
... |
currently not used. |
Details
The definitions of the first four residuals are provided in
Espinheira et al. (2008): equation (2) for "pearson
",
equation (6) for "weighted
", equation (7) for "sweighted
",
and equation (8) for "sweighted2
". For the last four residuals
the definitions are described in Espinheira et al. (2017): equations (7)
and (10) for the "sweighted.gamma
" and "sweighted2.gamma
",
respectively, equation (9) for "combined
", and equation (11)
for "combined.projection
".
Value
residuals
returns a vector with the residuals of the type
specified in the type
argument.
References
Maluf, Y. S., Ferrari, S. L. P., and Queiroz, F. F. (2022). Robust
beta regression through the logit transformation. arXiv:2209.11315.
Espinheira, P.L., Ferrari, S.L.P., and Cribari-Neto, F. (2008). On Beta
Regression Residuals. Journal of Applied Statistics, 35:407–419.
Espinheira, P.L., Santos, E.G.and Cribari-Neto, F. (2017). On nonlinear
beta regression residuals. Biometrical Journal, 59:445-461.
See Also
Examples
get(data("HIC", package = "robustbetareg"))
fit.hic <- robustbetareg(HIC ~ URB + GDP | 1,
data = HIC, alpha = 0.04)
res <- residuals(fit.hic, type = "sweighted2")
#plot(res)
#abline(h = 0)