This macro calculates Sen's Slope which is a nonparametric alternative for estimating a slope for a univariate time series. This approach involves computing slopes for all the pairs of ordinal time points and then using the median of these slopes as an estimate of the overall slope. Sen's slope is insensitive to outliers and can be used to detect if there is a trend in the data.

This macro calculates Sen's Slope which is a nonparametric alternative for estimating a slope for a univariate time series. This approach involves computing slopes for all the pairs of ordinal time points and then using the median of these slopes as an estimate of the overall slope. Sen's slope is insensitive to outliers and can be used to detect if there is a trend in the data.

Download the Macro

Be sure that Minitab knows where to find your downloaded macro. Choose File > Options > General. Under Macro location browse to the location where you save macro files.

Important

If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.

Required Inputs

  • A column of data

Running the Macro

Suppose your data are in C2. To run the macro, choose View > Command Line/History and type:

%SENSLOPE C2

Click Run.