# Regression - Driver Analysis

A Driver Analysis models the relationship between a dependent variable and one or more independent variables and quantifies the importance of each of the independent variables in predicting the dependent variable relative to the other independent variables.

## Interpretation

Driver analysis computes an estimate of the importance of various independent variables in predicting a dependent variable. Most commonly, the dependent variable measures preference or usage of a particular brand (or brands), and the independent variables measure characteristics of this brand (or brands). For example, the dependent variable may be a measure of overall satisfaction and the independent variables may be measurements of satisfaction with bank fees, efficiency, friendliness, wait times, etc.

### Variable statistics

Importance score the magnitude of the importance coefficient indicates the contribution each independent variable has in explaining the overall outcome variable relative to the other independent variables in the model. These importance scores are scaled to be a proportion of 100 to allow an easier numeric scale to interpret.

Raw score the magnitude of the raw importance contribution the independent variable has to the overall outcome variable. This raw importance is the contribution of the independent variable has in explaining the model R-squared relative to the other variables.

The coefficient is colored if the variable is statistically significant at the 5% level.

Standard Error measures the accuracy of an estimate. The smaller the standard error, the more accurate the predictions.

t-statistic the estimate divided by the standard error. The magnitude (either positive or negative) indicates the significance of the variable. The values are highlighted based on their magnitude.

p-value expresses the t-statistic as a probability. A p-value under 0.05 means that the variable is statistically significant at the 5% level; a p-value under 0.01 means that the variable is statistically significant at the 1% level. P-values under 0.05 are shown in bold.

### Overall statistics

n the sample size of the model

R-squared assess the goodness of fit of the model. A larger number indicates that the model captures more of the variation in the dependent variable.

### Create a Linear Regression Model in Displayr

With unstacked data the process is similar to a standard Regression model.

1. Go to Insert > Regression > Driver Analysis
2. Under Inputs > Outcome, select your dependent variable
3. Under Inputs > Predictor(s), select your independent variables

Stacked data can be handled with a

1. Go to Insert > Regression > Driver Analysis
2. Check the 'Allow stacked data' control to allow stacked data.
2. Under Inputs > Outcome, select a single dependent variable, if stacked it would have a multi structure.
3. Under Inputs > Predictor(s), select your independent variable set, this should have a grid structure that suitably matches the outcome variable above.

See Question Types for more information on grid and multi type structures.

## Object Inspector Options

Outcome The variable to be predicted by the predictor variables.

Predictors The variable(s) to predict the outcome.

Algorithm The fitting algorithm. Defaults to Regression but may be changed to other machine learning methods.

Type: You can use this option to toggle between different types of regression models, but note that certain types are not appropriate for certain types of outcome variable. The other types are not appropriate for a continuous outcome variable.

Linear.
Binary Logit See Regression - Binary Logit.
Ordered Logit See Regression - Ordered Logit.
Poisson See Regression - Poisson Regression.
Quasi-Poisson See Regression - Quasi-Poisson Regression.
NBD See Regression - NBD Regression.

Robust standard errors Computes standard errors that are robust to violations of the assumption of constant variance (i.e., heteroscedasticity). See Robust Standard Errors. This is only available when Type is Linear.

Missing data See Missing Data Options.

Output

Summary Gives summary output from a standard Regression model.
Detail Typical R output, some additional information compared to Summary, but without the pretty formatting.
ANOVA Analysis of variance table containing the results of Chi-squared likelihood ratio tests for each predictor.
Relative Importance Analysis The default; The results of a relative importance analysis. See here and the references for more information. This option is not available for Multinomial Logit. Note that categorical predictors are not converted to be numeric, unlike in Driver (Importance) Analysis - Relative Importance Analysis.
Shapley Regression See here and the references for more information. This option is only available for Linear Regression. Note that categorical predictors are not converted to be numeric, unlike in Driver (Importance) Analysis - Shapley.
Jaccard Coefficient Computes the relative importance of the predictor variables against the outcome variable with the Jaccard Coefficients. See Driver (Importance_ Analysis - Jaccard Coefficient. This option is only available for Linear Regression and requires both binary variables for the outcome variable and the predictor variables.
Correlation Computes the relative importance of the predictor variables against the outcome variable via the bivariate Pearson product moment correlations. This option is only available for Linear Regression. See Driver (Importance) Analysis - Correlation and references therein for more information.
Effects Plot Plots the relationship between each of the Predictors and the Outcome. Not available for Multinomial Logit.

Correction The multiple comparisons correction applied when computing the p-values of the post-hoc comparisons.

Variable names Displays Variable Names in the output instead of labels.

Absolute importance scores Whether the absolute value of Relative Importance Analysis scores should be displayed.

Auxiliary variables Variables to be used when imputing missing values (in addition to all the other variables in the model).

Weight. Where a weight has been set for the R Output, it will automatically applied when the model is estimated. By default, the weight is assumed to be a sampling weight, and the standard errors are estimated using Taylor series linearization (by contrast, in the Legacy Regression, weight calibration is used). See Weights, Effective Sample Size and Design Effects.

Filter The data is automatically filtered using any filters prior to estimating the model.

Crosstab Interaction Optional variable to test for interaction with other variables in the model. The interaction variable is treated as a categorical variable. Coefficients in the table are computed by creating separate regressions for each level of the interaction variable. To evaluate whether a coefficient is significantly higher (blue) or lower (red), we perform a t-test of the coefficient compared to the coefficient using the remaining data as described in Driver Analysis. P-values are corrected for multiple comparisons across the whole table (excluding the NET column). The P-value in the sub-title is calculated using a the likelihood ratio test between the pooled model with no interaction variable, and a model where all predictors interact with the interaction variable.

Automated outlier removal percentage A numeric value between 0 and 50 (including 0 but not 50) to specify the percentage of the data that is removed from analysis. If a zero-value is selected for this input control then no outlier removal is performed and a standard regression output for the entire (possibly filtered) dataset is applied. If a non-zero value is selected for this option then the regression model is fitted twice. The first regression model uses the entire dataset (after filters have been applied) and identifies the observations that generate the largest residuals. The user specified percent of cases in the data that have the largest residuals are then removed. The regression model is refitted on this reduced dataset and output returned. The specific residual used in linear regression is the studentized residual in an unweighted regression and the Pearson residual in a weighted regression. The studentized residual computes the distance between the observed and fitted value for each point and standardizes (adjusts) based on the influence and an externally adjusted variance calculation (see rstudent function in R and Davison and Snell (1991) for more details). The Pearson residual in the weighted case adjusts appropriately for the provided survey weights.

Random seed Seed used to initialize the (pseudo)random number generator for the model fitting algorithm. Different seeds may lead to slightly different answers, but should normally not make a large difference.

Additional options are available by editing the code.

### DIAGNOSTICS

Cook's distance plot Creates a line/rug plot showing Cook's Distance for each observation.

Cook's distance vs leverage plot Creates a scatterplot showing Cook's distance vs leverage for each observation.

Influence index plot Creates index plots of studentized residuals, hat values, and Cook's distance.

Multicollinearity (VIF) table Creates a table containing variance inflation factors (VIF) to diagnose multicollinearity.

Normal Q-Q plot Creates a normal Quantile-Quantile (QQ) plot to reveal departures of the residuals from normality.

Prediction-accuracy table Creates a table showing the observed and predicted values, as a heatmap.

Residual heteroscedasticity test Conducts a heteroscedasticity test on the residuals.

Residual normality (Shapiro-Wilk) test Conducts a Shapiro-Wilk test of normality on the (deviance) residuals.

Residuals vs fitted plot Creates a scatterplot of residuals versus fitted values.

Residuals vs leverage plot Creates a plot of residuals versus leverage values.

Scale-location plot Creates a plot of the square root of the absolute standardized residuals by fitted values.

Serial correlation (Durbin-Watson) test Conducts a Durbin-Watson test of serial correlation (auto-correlation) on the residuals.

### SAVE VARIABLE(S)

Save fitted values Creates a new variable containing fitted values for each case in the data.

Save predicted values Creates a new variable containing predicted values for each case in the data.

Save residuals Creates a new variable containing residual values for each case in the data.

When using this feature you can obtain additional information that is stored by the R code which produces the output.

1. To do so, select Create > R Output.
2. In the R CODE, paste: item = YourReferenceName
3. Replace YourReferenceName with the reference name of your item. Find this in the Report tree or by selecting the item and then going to Properties > General > Name from the object inspector on the right.
4. Below the first line of code, you can paste in snippets from below or type in str(item) to see a list of available information.

For a more in depth discussion on extracting information from objects in R, checkout our blog post here.

Properties which may be of interest are:

• Summary outputs from the regression model:
item\$summary\$coefficients # summary regression outputs