reg.hgld: Fit a Hurdle Generalized Lambda Distribution Regression model

Description Usage Arguments Details Value References Examples

View source: R/reg.hgld.R

Description

Fit a Hurdle Generalized Lambda Distribution Regression model to a dataset.

Usage

1
2
3
reg.hgld(data, zero.formula, loc.formula, full = FALSE, param = "fmkl",
  maxit = 20000, init = NULL, alpha = 0.05, n.simu = 1000,
  plotKS = TRUE, h.bins = 50)

Arguments

data

A dataset containing the variables of the model.

zero.formula

A symbolic expression of the model to be fitted to the hurdle parameter of the distribution.

loc.formula

A symbolic expression of the model to be fitted to the location of the distribution.

full

Whether a simulation method must be applied to derive a confidence interval for the location regression coefficients.

param

"fmkl" or "rs".

maxit

Maximum number of iterations for numerical optimization.

init

Choose a different set of initial values to start the optimization process. This can either be full set of parameters including GLD parameter estimates, or it can just be the coefficient estimates of the regression model.

alpha

Significance level of the Confidence Interval for the GLD regression.

n.simu

Number of times to repeat the simulation runs, defaults to 1000.

plotKS

Whether to plot the KS resample test result within each plot.

h.bins

Number of bins for the GLD Regression normalized quantiles residuals histogram.

Details

Given a dataset, estimate by the Numerical Maximum Likelihood method the regression coefficients of the model and the five parameters of the error GLD. The regression coefficients that model the location of the distribution are estimated by the functions GLD.lm and GLD.lm.full of package GLDreg. The regression coefficients that model the hurdle parameter of the distribution are estimated by function gamlss.

Value

coefficients

The estimated coefficients of the HGLD regression.

Zplot

A function that generates the four diagnostic plots of the logistic regression.

Zres.sumarry

Summary of the normalised quantile residuals of the logistic regression.

Zfit

Normalised quantile residuals versus fitted values for the logistic regression.

Zindex

Normalised quantile residuals versus index for the logistic regression.

Zdensity

Normalised quantile residuals density for the logistic regression.

Zqq

QQ-norm plot of the normalised quantile residuals for the logistic regression.

NZqq

QQ-plot for the GLD regression residuals.

NZquant

Quantile plot for the GLD regression residuals.

NZhistogram

The histogram of the GLD regression residuals.

NZplot

The normalised quantile residuals plots for the GLD regression.

NZres.sumarry

Summary of the normalised quantile residuals of the GLD regression.

NZfit

Normalised quantile residuals versus fitted values for the GLD regression.

NZindex

Normalised quantile residuals versus index for the GLD regression.

NZdensity

normalised quantile residuals density for the GLD regression.

NZqqQuant

QQ-norm plot of the normalised quantile residuals for the GLD regression.

KS

KS test p-value for the GLD regression.

gamlss

The gamlss object of the fitted logistic regression.

GLDreg

The GLDreg object of the fitted GLD regression.

Zdata

The data used to fit the logistic regression

NZdata

The data used to fit the GLD regression.

zero.formula

A symbolic expression of the model to be fitted to the hurdle parameter of the distribution.

loc.formula

A symbolic expression of the model to be fitted to the location of the distribution.

param

"fmkl" or "rs".

full

Whether a simulation method must be applied to derive a confidence interval for the location regression coefficients.

References

Marcondes, D.; Peixoto, C.; Maia, A. C.; A Survey of a Hurdle Model for Heavy-Tailed Data Based on the Generalized Lambda Distribution. (2017) arxiv1712.02183

Su, S.; Flexible Parametric Quantile Regression Model. (2015), Statistics & Computing May 2015, Volume 25, Issue 3, pp 635-650

Examples

1
2
3
4
5
6
set.seed(100)
tmp <- na.omit(healthcare)
data <- tmp[sample(1:nrow(tmp),50),]
formula <- log_expense ~ age + sex + log_previous_expense
reg <- suppressWarnings(reg.hgld(data = data,zero.formula = formula,loc.formula = formula,
                                 full = FALSE,param = "rs"))

dmarcondes/HGLD documentation built on May 28, 2019, 12:56 p.m.