Sorted chi-square tests

This macro performs a chi-square test of association for a single response versus each specified predictor, one predictor at a time. The p-value is calculated for each predictor. These p-values are then sorted from smallest to largest and displayed in a table.

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 response data
  • One or more columns of predictor data

Running the Macro

Suppose the response data are in C3, and the factors are in columns C4, C6, and C9. To run the macro, choose View > Command Line/History and type:

%SORTCHI C3 C4 C6 C9

Click Run.