I have a dependent variable which is a ratio and 0 < y < 1 condition holds. I will apply betareg in Stata but I am not sure what are the diagnostics that are required or can be omitted due to the distribution of Beta distribution of the estimation method chosen.


Raw residuals will not necessarily be normally distributed. Here are some simulated data, following the Ferrari & Cribari-Neto (2004) reparameterization of the beta distribution:

> set.seed(1839)
> library(betareg)
> inv_logit <- function(logit) exp(logit) / (1 + exp(logit))
> n <- 500
> x <- rnorm(n)
> mu <- inv_logit(-5 + .5 * x)
> phi <- exp(2 + .3 * x)
> p <- mu * phi
> q <- phi - (mu * phi)
> y <- rbeta(n, p, q)
> model <- betareg(y ~ x | x)
> summary(model)

betareg(formula = y ~ x | x)

Standardized weighted residuals 2:
    Min      1Q  Median      3Q     Max 
-4.8350 -0.4382  0.2585  0.6837  1.1680 

Coefficients (mean model with logit link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.1468     0.2054 -25.054  < 2e-16 ***
x             0.7231     0.1713   4.221 2.43e-05 ***

Phi coefficients (precision model with log link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)   2.1800     0.2091  10.427   <2e-16 ***
x             0.1336     0.1761   0.759    0.448    
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Type of estimator: ML (maximum likelihood)
Log-likelihood: 1.365e+04 on 4 Df
Pseudo R-squared: 0.2678
Number of iterations: 38 (BFGS) + 2 (Fisher scoring) 

Note that this model recovers the parameters (1, .5, 2, and .3) reasonably well. But let's look at the raw residuals (i.e., observed - fitted):

> qqnorm(model$residuals)
> qqline(model$residuals)

enter image description here

Even though I simulated the data exactly how the model works, the residuals are still non-normal. Why?

I think the best introduction to generalized linear models as a whole—at least for me—is "Generalized Linear Models" by Coxe, West, and Aiken from Chapter 3 of The Oxford Handbook of Quantitative Methods (Vol. II), Edited by Todd Little and published in 2013.

They make it clear that each generalized linear regression model is different—in part—because of how it models the residuals. They note that each generalized linear regression, including beta regression, follows three parts. One of these is the "random portion," which "defines the error distribution of the outcome variable." In table 3.1 on page 31, they show that, for beta regression, the error distribution is the beta distribution. That is, the outcome $Y$, conditional on parameters $p$ and $q$ (as defined in the reparameterization by Ferrari & Cribari-Neto), is beta distributed. So we should not expect the raw residuals of a beta regression to be normally distributed; they should be beta distributed.

That being said, it appears to me from reading, asking questions on this site, and emailing with some folks that do beta regression research, that diagnostics for beta regression is an area of active research. There are no universally accepted answers yet—at least from my reading of the literature.

There are a number of papers where people derive different types of residuals for beta regression that are meant to be normally distributed, so it is easier to do diagnostic checks. There are also some papers looking at influence statistics. I'm not sure what is implemented in Stata, but here are some papers I suggest reading and doing forward- and backward-searches on:

Pereira (2017). On quantile residuals in beta regression. Communications in Statistics - Simulation and Computation. doi: doi.org/10.1080/03610918.2017.1381740. See https://arxiv.org/abs/1704.02917 for a pre-print.

Espinheira, Santos, & Cribari-Neto (2017). On nonlinear beta regression residuals. Biometrical Journal, 59. doi: 10.1002/bimj.201600136

Espinheira, Ferrari, Cribari-Neto (2008). On beta regression residuals. Journal of Applied Statistics, 35. doi: 10.1080/02664760701834931

Espnheira, Ferrari, & Cribari-Neto (2008). Influence diagnostics in beta regression. Computational Statistics and Data Analysis, 52. doi: 10.1016/j.csda.2008.02.028

I myself—being someone who uses beta regression, has read a bit about it, but is not an expert on it—am not quite sold that there is any one (and implemented in software) method of doing robust diagnostic checks for beta regression. There are some beta regression experts here on CV that may correct me if I am wrong.

Doing an edit here for a quick follow-up. The betareg package suggests using an "sweighted2" residual, as noted in the JSS article for the betareg package, but this still comes up non-normal (although better!) in the model I created above:

> qqnorm(residuals(model, type = "sweighted2"))
> qqline(residuals(model, type = "sweighted2"))

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.