1. Home
  2. FRQUANTILES directive

FRQUANTILES directive

Forms regression quantiles.

Options

Y = variate Response variate
DESIGNMATRIX = matrix Design matrix for the regression model
TOLERANCE = scalar Tolerance for the algorithm; default 10-12

Parameters

PRQUANTILE = scalars Values for which to perform the quantile regressions
RESIDUALS = variates Parameter estimates from each quantile regression
ESTIMATES = variates or matrices Estimates from each quantile regression, either a variate of estimates for a specific quantile or, if PRQUANTILE is set to a missing value, a matrix with a row of estimates for every cumulative probability value in the CUMPROBABILITIES variate
XBARQUANTILES = variates When PRQUANTILE is set to a missing value, saves the sum of the mean of each design column multiplied by its regression quantile for all the quantile solutions
CUMPROBABILITIES = variates When PRQUANTILE is set to a missing value, saves the cumulative probabilitiy values at which the estimated regression quantiles change
EXIT = scalars Saves an exit code, with 0 to indicate success

Description

FRQUANTILES calculates regression quantile statistics using the algorithm of Koenker & D’Orey (1987). The Y option specifies the response variate, and the DESIGNMATRIX option specifies the design matrix for the regression model to be fitted. The design matrix can be formed, for example, using the TERMS directive.

The PRQUANTILE parameter can be set to a scalar specifying the probability value whose quantiles are required. The ESTIMATES parameter then saves the estimated regression quantile statistics, and the RESIDUALS parameter saves the corresponding residuals.

Alternatively, if PRQUANTILE parameter is set to a scalar containing a missing value, FRQUANTILES forms the complete set of “solutions” by finding all the probability values at which the regression quantiles change. These cumulative probabilities can be saved in a variate, using the CUMPROBABILITIES parameter, and the ESTIMATES parameter then saves a matrix with a row of estimates for each cumulative probability. The XBARQUANTILES parameter saves a variate containing the sum of the mean of each column of the DESIGNMATRIX multiplied by its regression quantile for all the cumulative probabilities.

The EXIT parameter can save a scalar containing an “exit” code, as follows:

    0 the algorithm was successful;
    1 the solution was not unique;
    2 the algorithm failed.

If EXIT is set, no Genstat diagnostic is given if the algorithm fails, unless the failure arises from an incorrect option or parameter setting, or because Genstat has run out of workspace.

Options: Y, DESIGNMATRIX, TOLERANCE.

Parameters: PRQUANTILE, RESIDUALS, ESTIMATES, CUMPROBABILITIES, XBARQUANTILES, EXIT.

Method

For more details of quantile regression and of the estimation method, see Koenker (2005) and Koenker & D’Orey (1987).

Action with RESTRICT

FRQUANTILES takes account of restrictions on the Y variate.

References

Koenker, R. (2005). Quantile Regression. Cambridge University Press, New York.

Koenker, R.W. & D’Orey, V. (1987). Algorithm AS229 computing regression quantiles. Applied Statistics, 36, 383-393.

See also

Directives: FIT, TERMS.

Procedures: RQLINEAR, RQNONLINEAR, RQSMOOTH.

Function: RQOBJECTIVE.

Commands for: Regression analysis, Calculations and manipulation.

Updated on March 7, 2019

Was this article helpful?