This notebook is provided as a demonstration of the package Aplot.

Installation and initialization

The mathematica program file Aplot.m should be put in  $AddOnsDirectory/Applications of Mathematica's main directory.

The  package Aplot.m can  be loaded with

<<Aplot.m

Entering data

\(Regression\ data\ in\ Mathematica\ must\ be\ a\ list\ of\ vectors . \ 
            Each\ vector\ consists\ of\ the\ observed\ \ values\ of\ the\ independent\ variables\ and\ the\ associated\ response\ variable . \ 
            Write\ your\ data\ as\ \(follows : 

\ myData\)\)={{(Subscript[x, 11]), (Subscript[x, 12]), ...., (Subscript[y, 1])},{(Subscript[x, 21]), (Subscript[x, 22]), ...., (Subscript[y, 2])},....} 

where  (Subscript[x, ik]) is the value of the ith case of the kth independent variable and (Subscript[y, i]) is the value of the
ith case of the response variable.

Sample data set

To test the package, we will use the Hald's data set which is commonly used in model selection literature. In this data set, the amount of the four ingredients tricalcium aluminate (x1), tricalcium allicate (x2), terracalcium aluminoferrite (x3) and dicalcium silicate (x4) relate to the heat evolved in calories per gram of cement (Y) . Evaluate the following cell to input the Hald's data set.

HaldData = {{7, 26, 6, 60, 78.5}, {1, 29, 15, 52, 74.3}, {11, 56, 8, 
            20, 104.3}, {11, 31, 8, 47, 87.6}, {7, 52, 6, 33, 95.9}, {11, 55, 
            9, 22, 109.2}, {3, 71, 17, 6, 102.7}, {1, 31. , 22. , 44. , 
            72.5}, {2. , 54. , 18. , 22. , 93.1}, {21, 47, 4, 26, 115.9}, {1, 
            40, 23, 34, 83.8}, {11, 66, 9, 12, 113.3}, {10, 68, 8, 12, 
            109.4}};

Testing the program

There is only one function in the package, which is drawAp[data,alpha]. After entering your data and the level of significance alpha. Type this function and evaluate the cell. The package will run all possible regressions and calculate some angular values and draw the Ap plot as follows:

drawAp[data = HaldData, alpha = 0.05]