This command is available with the Predictive Analytics Module. Click here for more information about how to activate the module.

Assume there are *m* predictors in a training data set, denoted as
*X*_{1}, *X*_{2}, ..., *X*_{m}. First,
sort the distinct values of predictor *X*_{1} in the training data set in
increasing order. Denote *x*_{11} as the first distinct value of
*X*_{1}. Denote *x*_{1N} as the last distinct value of
*X*_{1}. Then, *x*_{11} is the x-coordinate for the
leftmost point on the plot.

Use the following steps to find the y-coordinate at *x*_{11} .

- Find the fitted value for
*x*_{11}from only the basis functions that involve the predictor for the plot. - Find the fitted value at evenly distributed points from
*x*_{11}to*x*_{1N} - Subtract the minimum fitted value from the fit at
*x*_{11}.

For example, suppose that a model has the following 2 basis functions:

- BF 1 = max(0,
*x*_{1}− 350) - BF 2 = max(0,
*x*_{2}- 500)

Also suppose that the model has the following regression equation:

Y = 1000 - 5 * BF1 + 3 * BF2

Last, suppose that *x*_{11} = 400 and that the minimum fit of the evenly
distributed points is 100.

To find the y-coordinate for a partial dependence plot for X_{1}, consider only
the basis functions that involve X_{1}. Then the fit for *x*_{11}
that considers only the basis function for X_{1} comes from:

1000 − 5 * (max(0, 400 - 350)) = 1000 − 5*50 = 750.

Then the y-coordinate for *x*_{11} is 750 - 100 = 650.

Replacing *x*_{11} by evenly distributed values from *X*_{1} to
*X*_{N}, we get the y-coordinates for the rest of the points on the
plot. These points allow you to investigate the y-coordinates on the plot in detail. The
patterns on the plot are approximately the same as a plot with lines that connect points
where the basis functions change. The calculations for the rest of the predictors are
done similarly.