quantile regression estimation
[r] = qreg1(y,x,tau,w,algo,maxit,eps,big,sigma)
* y = a (nobs x 1) real vector of endogenous variable
* x = a (nobs x k) real matrix of exogenous variables
* tau = a (q x 1) vector, the values of the quantiles
* w = a vector of the same size as the endoegnous variable, if the user wants to weight differently the observations (default: equal weights)
* algo = a string, the name of the algorithm ('linpro' or 'qreg_solvelp1')
* maxit = a scalar, the maximum number of iterations allowed (default: none)
* eps = a scalar, the tolerance value for convergence (default: sqrt(%eps))
* big = a scalar, the number used to remove the residuals of the wrong sign (default: 1E20)
* sigma = a scalar, < 1, the scaling factor determines how close the corrector step is allowed to come to the boundary of the constraint set in the interior point method
* res = a results tlist with
- res('meth') = 'quantile'
- res('y') = y data vector
- res('x') = x data matrix
- res('tau') = vectores of quantiles to be estimated
- res('weights') = 0 or a (nobs x 1) vector of observations weights
- res('nobs') = # observations
- res('nvar') = # variables
- res('beta') = (nvar x q) matrix of quantile estimations
X = grand(100,3,'nor',0,1); X1 = X(:,1) X2 = X(:,2) Y = 12 + 3*X1 + 5*X2 + .2*X(:,3); tau = [0.05;0.50;0.75;0.95]; r = qreg1(Y,[ones(100,1) X1 X2],tau,0,'linpro',%inf,sqrt(%eps),1E20,0.99995); // Performs quantile regression on simulated data, with algorithm 'linpro' (needs to have previously installed the toolbox 'quapro') and default qreg values. | ![]() | ![]() |