betareg_gwbr: Global Beta Regression Model

View source: R/betareg_gwbr.R

betareg_gwbrR Documentation

Global Beta Regression Model

Description

Fits a global regression model using the beta distribution, recommended for rates and proportions, via maximum likelihood using a parametrization with mean (transformed by the link function) and precision parameter (called phi). For more details see Ferrari and Cribari-Neto (2004).

Usage

betareg_gwbr(
  yvar,
  xvar,
  data,
  link = c("logit", "probit", "loglog", "cloglog"),
  maxint = 100
)

Arguments

yvar

A vector with the response variable name.

xvar

A vector with descriptive variable(s) name(s).

data

A data set object with yvar and xvar.

link

The link function used in modeling. The options are: "logit", "probit", "loglog" or "cloglog". The default is "logit".

maxint

A Maximum number of iterations to numerically maximize the log-likelihood function in search of the estimators. The default is maxint=100.

Value

A list that contains:

  • parameter_estimates - Parameter estimates.

  • phi - Precision parameter estimate.

  • residuals - Table with observed values (y), estimated values in classical regression (yhatcl), pure residual in classical regression (ecl), estimated values (yhat), the link function applied in the estimated values (eta), pure residual (res), standardized residual (resstd), standardized weighted residual 2 (resstd2), residual deviance (resdeviance), Cooks distance (cookD) and generalized leverage (glbp).

  • log_likelihood - Log-likelihood of the fitted model.

  • aicc - Corrected Akaike information criterion.

  • r2 - Pseudo R2 and adjusted pseudo R2 statistics.

  • bp_test - Breusch-Pagan test for heteroscedasticity.

  • link_function - The link function used in modeling.

  • n_iter - Number of iterations used in convergence.

Examples

data(saopaulo)
output_list=betareg_gwbr("prop_landline",c("prop_urb","prop_poor"),saopaulo)

## Parameters
output_list$parameter_estimates

## R2 and AICc
output_list$r2
output_list$aicc

gwbr documentation built on July 9, 2023, 6:12 p.m.