ugrpl: Unit Gamma Regression with Parametric Link Functions

View source: R/5_fit_function.R

ugrplR Documentation

Unit Gamma Regression with Parametric Link Functions

Description

Fit the unit gamma regression with parametric link functions via maximum likelihood for a parameterization of this distribution that is indexed by mean and dispersion parameters.

Usage

ugrpl(
  formula,
  data,
  subset,
  na.action,
  link = "aordaz",
  sigma.link,
  control = ug_control(...),
  y = TRUE,
  x = TRUE,
  ...
)

Arguments

formula

simbolic description of the model, of type y ~ x for covariates in the mean model only or y ~ x | z to enter covariates in the dispersion model. See details below.

data, subset, na.action

arguments controlling formula processing via model.frame.

link, sigma.link

character specification of the link function for the mean and the dispersion submodels, respectively. For the mean submodel, Aranda-Ordaz ("aordaz") is the default link function. If it is not assumed that the dispersion submodel depends on covariates (i.e., is sigma.link is missing), the default link is the identity ("identity"), otherwise, the Aranda-Ordaz link function. The list of currently available links can be consulted in the details below.

control

a list of control parameters passed as arguments for the optim function specified via ug_control.

y, x

logicals. If TRUE the corresponding components of the fit, response and model matrices, are returned.

...

arguments passed to ug_control.

Details

This implementation uses a parameterization of the unit gamma distribution indexed by the mean (mu) and a dispersion parameter (sigma) in which both mu and sigma take values on (0, 1), see dugamma. It is assumed that the mean depends on covariates through a link function, which can belong to a family of parametric link functions or be one of the customarily used link functions (e.g., logit or probit). Moreover, since the dispersion parameter sigma takes values on (0, 1), it is equally possible to consider a regression structure using a parametric link function.

The basic formula is of type y ~ x1 + x2 + ... + xk which specifies the model for the mean response only. Following the syntax of the betareg package (Cribari-Neto and Zeileis, 2010), the model for the dispersion index, say in terms of z1, z2, ..., zl, is specified as y ~ x1 + x2 + ... + xk | z1 + z2 + ... + zl using functionalities inherited from package Formula (Zeileis and Croissant, 2010).

We assume that the link functions belonging to a parametric family are indexed by a positive parameter lambda. When the link function does not belong to this family (e.g., the logit function), then, by default, lambda = NULL. The available link functions are

Link function Abbreviation Is it a parametric link function?
Logit "logit" FALSE
Probit "probit" FALSE
Cauchit "cauchit" FALSE
Log-Log "loglog" FALSE
Complement log-log "cloglog" FALSE
Identity "identity" FALSE
Aranda-Ordaz "aordaz" TRUE
Power logit "plogit" TRUE
Power pobit "pprobit" TRUE
Power cauchit "pcloglog" TRUE
Power log-log "ploglog" TRUE
Power complement log-log "pcloglog" TRUE
Reversal power logit "rplogit" TRUE
Reversal power pobit "rpprobit" TRUE
Reversal power cauchit "rpcauchit" TRUE
Reversal power log-log "rploglog" TRUE
Reversal power complement log-log "rpcloglog" TRUE
Reversal Aranda-Ordaz "raordaz" TRUE

Value

The ugrpl function returns an object of class "ugrpl", which consists of a list with the following components:

coefficients

a list containing the elements "mean" and "dispersion" that consist of the estimates of the coefficients associated with the mean and the dispersion, respectively.

lambda

a list with the estimates of parameters associated with parametric link functions. If a non-parametric link is used, NULL is returned.

sigma

a vector with the fitted dispersion parameters.

link, sigma.link

link function specified for the mean and the dispersion, respectively.

fitted.values

a vector with the fitted means.

logLik

log-likelihood of the fitted model.

vcov

asymptotic covariance matrix of the maximum likelihood estimators of all parameters in the model. By default, the asymptotic covariance matrix is based on Fisher's information matrix, but can be obtained from the Hessian matrix (obtained numerically via optim) if hessian = TRUE.

residuals

a vector of quantile residuals.

convergence

logical; if TRUE, it indicate successful convergence.

start

the initial values of the optimization algorithm.

optim

output from the optim call for maximizing the log-likelihood.

control

the control arguments passed to the optim call.

nobs

number of observations.

df.null

residual degrees of freedom in the null model (constant mean and dispersion), that is, n - 2.

df.residual

residual degrees of freedom in the fitted model.

call

the function call.

formula

the formula used to specify the model in ugrpl.

terms

a list with elements "mean", "dispersion" and "full" containing the terms objects for the respective models,

y

the response vector (if y = TRUE).

x

a list with elements "mean" and "dispersion" containing the model matrices from the respective models (if x = TRUE).

Author(s)

Rodrigo M. R. de Medeiros <rodrigo.matheus@live.com>

References

Cribari-Neto F, Zeileis A (2010). Beta Regression in R. Journal of Statistical Software, 34, 1-24

Zeileis A, Croissant Y (2010). Extended Model Formulas in R: Multiple Parts and Multiple Responses. Journal of Statistical Software, 34, 1-13.


rdmatheus/ugrpl documentation built on July 13, 2024, 10:24 p.m.