It finds the best fit distribution in robust linear quantile regression model. It adjusts the Normal, Student's t, Laplace, Slash and Contaminated Normal models. It shows a summary table with the likelihood-based criterion, envelopes plots and the histogram of the residuals with fitted densities for all models. Estimates and full inference are provided for the best model.
best.lqr(formula,data = NULL,subset = NULL,
p = 0.5, precision = 10^-6,
criterion = "AIC")
For the best model:
number of iterations.
attained criteria value.
fixed effects estimates.
scale parameter estimate for the error term.
Estimate of nu
parameter detailed above.
Estimate of gamma
parameter detailed above.
Standard Error estimates.
Table containing the inference for the fixed effects parameters.
Log-likelihood value.
Akaike information criterion.
Bayesian information criterion.
Hannan-Quinn information criterion.
vector containing the fitted values.
vector containing the residuals.
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.
an optional data frame, list or environment (or object coercible by as.data.frame
to a data frame) containing the variables in the model. If not found in data
, the variables are taken from environment(formula)
.
an optional string specifying a subset of observations to be used in the fitting process. Be aware of the use of double quotes in a proper way when necessary, e.g., in "(sex=='F')"
.
An unique quantile or a set of quantiles related to the quantile regression.
The convergence maximum error permitted. By default is 10^-6.
Likelihood-based criterion to be used for choosen the best model. It could be AIC
, BIC
, HQ
or loglik
(log-likelihood). By default AIC
criterion will be used.
Christian E. Galarza <cgalarza88@gmail.com>, Luis Benites <lsanchez@ime.usp.br> and Victor H. Lachos <hlachos@ime.unicamp.br>
Maintainer: Christian E. Galarza <cgalarza88@gmail.com>
The best.fit()
function finds the best model only for one quantile. For fitting a grid of quantiles lqr()
might be used but the distribution must be provided.
Galarza, C., Lachos, V. H., Cabral, C. R. B., & Castro, C. L. (2017). Robust quantile regression using a generalized class of skewed distributions. Stat, 6(1), 113-130.
Wichitaksorn, N., Choy, S. T., & Gerlach, R. (2014). A generalized class of skew distributions and associated robust quantile regression models. Canadian Journal of Statistics, 42(4), 579-596.
lqr
,Log.lqr
,Log.best.lqr
,dSKD
# \donttest{
data(crabs,package = "MASS")
#Finding the best model for the 3rd quartile based on BIC
best.lqr(BD~FL,data = crabs, p = 0.75, criterion = "BIC")
# }
Run the code above in your browser using DataLab