The qfitControl structure

Goals

This tutorial introduces the qFitControl structure. After this tutorial, you should understand:

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:

1. Declare an instance of the qFitControl structure.
// Declare 'qCtl' to be a 'qFitControl' structure
struct qFitControl qCtl;
1. Fill the created structure with default parameter values using qFitControlCreate.
// Fill 'qCtl' with default settings
qCtl = qFitControlCreate();
1. Change the desired modeling parameters using the appropriate qFitControl members.
qFit.varnames = "Age"$|"Age2"$|"Tenure";

The qFitControl structure members

The qFitControl structure contains the following members for controlling quantile regression :

qCtl.varnames
String array, the variable names to be printed in the output table. String array length must equal the number of independent variables.
qCtl.verbose
Scalar, indicating whether to the print results, 0 = no printing, 1 = print results. Default = 1.
qCtl.const
Scalar, indicating whether to include a constant in regression. 0 = no constant, 1 = constant. Default = 1.
qCtl.bootstrap
Scalar, indicating the number of bootstrap repetitions used to find bootstrap standard errors and confidence intervals. Default = 0, no bootstrap errors computed.
qCtl.alpha
Scalar, alpha value for computing bootstrap confidence intervals. Not valid if qCtl.bootstrap = 0.

Including the qFitControl structure in the quantileFit call

Once the 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 quantileFit.

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);

Conclusion

Congratulations! After this tutorial you should :

• Be able declare an instance of the qFitControl structure.
• Know how to fill the qFitControl structure with default values.
• Be able to change the values of the members of the qFitControl structure.
• Know the members contained in the qFitControl structure
• Know how to pass the qFitControl structure to the quantileFit procedure

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 qFit.varnames member.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.