quantile_residuals: This function is used to compute the quantile residuals in a...

View source: R/quantile_residuals.R

quantile_residualsR Documentation

This function is used to compute the quantile residuals in a fitted beta regression model.

Description

When fitting beta regression models, the quantile residuals are argued to be the more reasonable and useful measure of deviation from fitted and actual values in the model (Pereira, 2019). This stands in contrast to the currently more typically used adjusted weighted standardized residual 1 or the weighted standardized residual 2.

Usage

quantile_residuals(betareg_mod, dat, outcome)

Arguments

betareg_mod

The fitted beta regression model using the 'betareg' function.

dat

The dataframe used to fit the 'betareg' model also used in this function. The dimensions of the dataframe must match those of the dataframe used to fit the 'betareg' object.

outcome

The response variable from the original dataframe used in the 'betareg' object. Specified as a character string.

Details

Currently, this function only works for models fitted using the 'betareg' function in 'R'.

References

Pereira, G. H. (2019). On quantile residuals in beta regression, Communications in Statistics - Simulation and Computation 48(1), 302-316, doi: 10.1080/03610918.2017.1381740.

Examples


require(betareg)
data("GasolineYield", package = "betareg")

gy = betareg(yield ~ batch + temp | temp, data = GasolineYield)

summary(gy)

quantile_residuals(gy, GasolineYield, "yield")


UKBiostatCIRCL/UK-Biostat-CIRCL documentation built on June 30, 2022, 4:42 a.m.