This tutorial introduces the
qFitControl structure. After this tutorial, you should understand:
- How to declare an instance of the
- What members are included in the control structure
- How to pass the qFitControl structure to quantileFit
The qFitControl Structure
GAUSS quantile regression implements default modeling parameters to allow you to estimate models with minimal programming. However, you are also able to set custom modeling options using the
qFitControl structure. Using the
qFitControl structure requires three steps:
- Declare an instance of the
// Declare 'qCtl' to be a 'qFitControl' structure struct qFitControl qCtl;
- Fill the created structure with default parameter values using
// Fill 'qCtl' with default settings qCtl = qFitControlCreate();
- Change the desired modeling parameters using the appropriate
qFit.varnames = "Age"$|"Age2"$|"Tenure";
The qFitControl structure members
qFitControl structure contains the following members for controlling quantile regression :
- String array, the variable names to be printed in the output table. String array length must equal the number of independent variables.
- Scalar, indicating whether to the print results, 0 = no printing, 1 = print results. Default = 1.
- Scalar, indicating whether to include a constant in regression. 0 = no constant, 1 = constant. Default = 1.
- Scalar, indicating the number of bootstrap repetitions used to find bootstrap standard errors and confidence intervals. Default = 0, no bootstrap errors computed.
- Scalar, alpha value for computing bootstrap confidence intervals. Not valid if qCtl.bootstrap = 0.
Including the qFitControl structure in the quantileFit call
qFitControl structure is declared and the members are appropriately set, the structure must be passed to the
quantileFit procedure. The
qFitControl structure must always be passed as the final input into
For example, if no optional arguments are included, the
qFitControl structure should be the third input
// Call quantileFit qOut = quantileFit(y, x, qCtl);
Similarly, if quantile levels are specified, then the
qFitControl structure should be the fourth input
// Call quantileFit qOut = quantileFit(y, x, tau, qCtl);
Congratulations! After this tutorial you should :
- Be able declare an instance of the
- Know how to fill the
qFitControlstructure with default values.
- Be able to change the values of the members of the
- Know the members contained in the
- Know how to pass the
qFitControlstructure to the
Now that we have been introduced the
qFitControl structure we will next look more closely at the members in the
qFitControl structure. The next tutorial teaches how to change variable names using the