View source: R/5_fit_function.R
ugrpl | R Documentation |
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.
ugrpl(
formula,
data,
subset,
na.action,
link = "aordaz",
sigma.link,
control = ug_control(...),
y = TRUE,
x = TRUE,
...
)
formula |
simbolic description of the model, of type
|
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 ( |
control |
a list of control parameters passed as arguments for
the |
y , x |
logicals. If |
... |
arguments passed to |
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
|
The ugrpl
function returns an object of class "ugrpl"
,
which consists of a list with the following components:
a list containing the elements "mean" and "dispersion" that consist of the estimates of the coefficients associated with the mean and the dispersion, respectively.
a list with the estimates of parameters associated with
parametric link functions. If a non-parametric link is used,
NULL
is returned.
a vector with the fitted dispersion parameters.
link function specified for the mean and the dispersion, respectively.
a vector with the fitted means.
log-likelihood of the fitted model.
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
.
a vector of quantile residuals.
logical; if TRUE
, it indicate successful convergence.
the initial values of the optimization algorithm.
output from the optim call for maximizing the log-likelihood.
the control arguments passed to the optim call.
number of observations.
residual degrees of freedom in the null model (constant mean and dispersion), that is, n - 2.
residual degrees of freedom in the fitted model.
the function call.
the formula used to specify the model in ugrpl
.
a list with elements "mean", "dispersion" and "full" containing the terms objects for the respective models,
the response vector (if y = TRUE
).
a list with elements "mean" and "dispersion" containing the
model matrices from the respective models (if x = TRUE
).
Rodrigo M. R. de Medeiros <rodrigo.matheus@live.com>
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.