View source: R/quantile_residuals.R
quantile_residuals | R Documentation |
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.
quantile_residuals(betareg_mod, dat, outcome)
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. |
Currently, this function only works for models fitted using the 'betareg' function in 'R'.
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.
require(betareg) data("GasolineYield", package = "betareg") gy = betareg(yield ~ batch + temp | temp, data = GasolineYield) summary(gy) quantile_residuals(gy, GasolineYield, "yield")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.