Description Usage Arguments Details Value References Examples
Quantile function of a Hurdle Generalized Lambda Regression.
1 |
p |
Vector of probabilities. |
reg |
An object of class reg.hgld. |
newvalues |
A data frame with the new values of the covariates. Column names must match the ones given in formulas loc.formula and zero.formula of the reg.hgld object. |
l0 |
Whether to return the lambda0 of each profile. |
location |
Whether to return the location of each profile. |
Given an object of class reg.hgld, a percentile and new values for the covariates, it returns the quantile of the fitted HGLD, given the covariates. The fitted HGLD must be non-negative. The contrast on the newvalues data frame must be the same of the data used to fit the reg.hgld regression.
The quantile of the new values, according to the fitted HGLD regression.
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
1 2 3 4 5 6 7 8 | 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"))
newvalues <- tmp[sample(1:nrow(tmp),5),c(2,3,8)]
qhgld.reg(p = seq(0.05,0.95,0.1),reg,newvalues)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.