best.lqr: Best Fit in Robust Linear Quantile Regression

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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.

Usage

1
best.lqr(y, x, p = 0.5, precision = 10^-6, criterion = "AIC")

Arguments

y

the response vector of dimension n where n is the total of observations.

x

design matrix for the fixed effects of dimension N x d where d represents the number of fixed effects including the intercept, if considered.

p

An unique quantile or a set of quantiles related to the quantile regression.

precision

The convergence maximum error permitted. By default is 10^-6.

criterion

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.

Details

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.

Value

For the best model:

iter

number of iterations.

criteria

attained criteria value.

beta

fixed effects estimates.

sigma

scale parameter estimate for the error term.

nu

Estimate of nu parameter detailed above.

gamma

Estimate of gamma parameter detailed above.

SE

Standard Error estimates.

table

Table containing the inference for the fixed effects parameters.

loglik

Log-likelihood value.

AIC

Akaike information criterion.

BIC

Bayesian information criterion.

HQ

Hannan-Quinn information criterion.

fitted.values

vector containing the fitted values.

residuals

vector containing the residuals.

Author(s)

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>

References

Galarza, C.M., Lachos, V.H., Cabral, C.R.B. and Castro, L.M. (2016). Robust Quantile Regression using a Generalized Class of Skewed Distributions. Technical Report 7, Universidade Estadual de Campinas. http://www.ime.unicamp.br/sites/default/files/rp07-16.pdf

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.

See Also

lqr,Log.lqr,Log.best.lqr,dSKD,QRLMM, QRNLMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
data(crabs,package = "MASS")

crabs$sex <- as.character(crabs$sex)
crabs$sex[crabs$sex=="M"]=0
crabs$sex[crabs$sex=="F"]=1
crabs$sex = as.numeric(crabs$sex)

attach(crabs)

##Setting
y  <- BD
x  <- cbind(1,FL,sex)

#Finding the best model for the 3rd quartile based on Akaike criterion
res = best.lqr(y, x, p = 0.75, criterion = "AIC")
 
## End(Not run)

lbenitesanchez/lqr documentation built on May 9, 2019, 12:49 p.m.