Table of Contents

Introduction

Tool Use

Example

CADStat: Statistical Tools for Causal Analysis

Quantile Linear Regression

# Introduction

Quantile linear regression involves constructing a linear model based on quantiles of the data. This approach differs from more standard parametric linear regressions that model the mean values of the data. Quantile regression computes parameter estimates by minimizing the sum of the absolute errors, where the errors are computed with respect to a quantile of interest.

# Tool Use

Select Analysis Tools -> Quantile Regression from the menus. A dialog box will open. Select the data set of interest from the pull-down menu, or browse for a tab-delimited text file. The Data Subsetting tab can be used to select a subset of the data file by choosing a variable from the pull down menu and then selecting the levels of that variable to include. You can hold down the <CTRL> key to select several levels.

Select a Dependent variable (the variable you wish to model).

Select all explanatory (Independent) variables you wish to include in the model. You can hold down the <CTRL> key to select several variables. Note: the dependent variable is in the list of possible independent variables, but it should not be selected as an independent variable.

Type in the quantiles that you wish to estimate in the Quantiles dialog. You may type in up to 8 quantiles, all of which must be between 0 and 1. These must be typed from top to bottom — skipped lines will result in later values being ignored. Be sure that you hit <TAB> or <ENTER> after typing in your last quantile and before hitting Submit, or the last quantile will not register.

Confidence intervals for the regression coefficients are generated only if Compute Confidence Intervals is selected. The confidence level can be changed only after Compute Confidence Intervals is selected.

If Regression Scatterplot is selected, then one scatterplot is plotted for each independent variable, of the dependent versus independent variable with overlaid quantile regression fits. Confidence bounds on the fit are added to the plot if Coefficient Confidence Bands is chosen.

The output is the regression coefficients, with confidence bounds if selected, and scatterplots if selected.

# Example

First select Analysis Tools -> Quantile regression.

Once this is selected, a new dialog window should appear. Specify `mergedData` as your active dataset (see help page for Loading and merging data for information on loading CADStat example data).

Here average stream temperature (`temp.avg`) has been selected as the response (dependent) variable and elevation (`elev.ut`) has been selected as the explanatory (independent) variable. The default quantile is 0.50, but for this example we have changed it to 0.1 and 0.9. Once the quantile has been changed, you must hit the enter key to commit the change. There is an additional option to display the Regression Scatterplot. That option is selected in this example. The following figure shows the regression scatterplot, with the line corresponding to the parametric regression for the mean (simple linear regression), and the lines corresponding to the quantile regressions for the 10th and 90th quantiles. The parameter estimates are also presented in the CADStat console.

#