In our previous
quantileFit tutorials, we have used the
call command to print results directly to the screen. This is convenient for quickly viewing results but you may wish to store your results for later use.
This tutorial introduces the use of the
qFitOut structure to store results from quantile regressions. In this tutorial we will learn:
- How to declare an instance of the
qFitOutstructure for use.
- What members are contained in the
- How to view members in the
Declaring the structure
Prior to use, a structure must be declared using the
struct keyword :
struct qFitOut qOut;
Once declared, the structure will be visible in the symbol editor:
Members in the qFitOut structure
qFitOut structure holds five members:
- Matrix, the estimated regression coefficients. Estimates for separate quantiles are contained in separate columns.
- Matrix, the positive part of residuals. Residuals for separate quantiles are contained in separate columns.
- Matrix, the negative part of residuals. Residuals for separate quantiles are contained in separate columns.
- Array, bootstrapped confidence intervals. Confidence intervals for separate quantiles are stored in separate planes. These are only computed if bootstrap computations is specified.
- Vecter, bootstrapped standard errors. Standard errors for separate quantiles are stored in separate columns. These are only computed if bootstrap computations is specified.
These members are filled by the
// Declare structure struct qFitOut qOut; // Estimate model qOut = quantileFit(y, x);
Viewing members of the output structure
The members of the
qFitOut structure can be viewed three different ways:
- Navigating to the data page and double-clicking on a structure member in the Active Symbol Tree.
- Placing the cursor anywhere on the structure name in a program file and using
Ctrl+Eto open a floating Symbol Editor.
- Print the member contents to the output screen using the
-11.676810 4.7151959 11.997397 21.834192 1.6789851 2.1301881 2.1965671 2.5095988
Congratulations! After completing this tutorial you should understand how to store and view the output from the
The next tutorial examines how to change variable names in the
quantileFit output table using the