MyNixOS website logo
Description

Robust Beta Regression.

Robust estimators for the beta regression, useful for modeling bounded continuous data. Currently, four types of robust estimators are supported. They depend on a tuning constant which may be fixed or selected by a data-driven algorithm also implemented in the package. Diagnostic tools associated with the fitted model, such as the residuals and goodness-of-fit statistics, are implemented. Robust Wald-type tests are available. More details about robust beta regression are described in Maluf et al. (2022) <arXiv:2209.11315>.

robustbetareg

CRANstatus

The robustbetareg package allows fitting robust beta regression. Currently, four types of robust estimators are supported. They depend on a tuning constant which may be fixed or selected by a data-driven algorithm also implemented in the package. Diagnostic tools associated with the fitted model, such as the residuals and goodness-of-fit statistics, are implemented. Robust Wald-type tests are available.

Installation

You can install the development version of robustbetareg from GitHub with:

# install.packages("devtools")
devtools::install_github("yurimaluf/robustbetareg")

Main function

The main function of the $\textbf{robustbetareg}$ package is robustbetareg(), which allows fitting robust beta regression to proportional data on the unit interval $(0,1)$. The arguments of robustbetareg() are:

robustbetareg(formula, data, alpha, type = c("LSMLE", "LMDPDE", "SMLE", "MDPDE"),
  link = c("logit", "probit", "cloglog", "cauchit", "loglog"), link.phi = NULL,
  control = robustbetareg.control(...), model = TRUE, ... )

The robustbetareg() function returns an object of class “robustbetareg”, similar to “betareg” and “glm” objects, for which some methods are available. The summary() method returns a standard output, with coefficient estimates, standard errors, partial Wald-type tests and p values for the regression coefficients, the pseudo $R^2$, etc.. The type argument in robustbetareg() specifies the type of estimators to be used. The plot() method draws graphs for diagnostic analyses.

Example

library(robustbetareg)
## basic example code

In the following, an example is presented to illustrate the capacities of $\textbf{robustbetareg}$ package. We use the Firm dataset, available in the package.

data("Firm", package = "robustbetareg)

The response variable is FIRMCOST and the covariates are the logarithm of total assets (SIZELOG) and a measure of the firm’s industry risk (INDCOST). In the following, we fit the beta regression model using the maximum likelihood estimator and the LSMLE, a robust estimator, with tuning constant selected by the data-driven algorithm.

# MLE fit (fixed alpha equal to zero)
fit_MLE <- robustbetareg(FIRMCOST ~ SIZELOG + INDCOST,
                         data = Firm, type = "LSMLE", alpha = 0,
                         link.phi = "log")
summary(fit_MLE)

# LSMLE fit (choosing alpha via the data-driven algorithm)
fit_LSMLE <- robustbetareg(FIRMCOST ~ SIZELOG + INDCOST,
                            data = Firm, type = "LSMLE",
                            link.phi = "log")

The goodness of fit is assessed using diagnostic graphs through the plot method.

plot(fit_LSMLE)

Further details and examples on the R package $\textbf{robustbetareg}$ can be found using the help on R by typing:

help("robustbetareg")

Reference

Maluf, Y.S., Ferrari, S.L.P., and Queiroz, F.F. (2022). Robust beta regression through the logit transformation. $\textit{arXiv}$:2209.11315.

Metadata

Version

0.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows