Multinomial Regression

 

This example used Minitab 12 saved data set, tvhrs.mtw. Inside Minitab, go into the Minitab folder and click on Student12 à tvhrs.mtw . For this data, we will try to predict the amount of hours spent watching mtv based on the age of the participant, the number of hours spent watching tv, and the number of hours spent watching the news.

 

Getting Slope, Y Intercept and Model Utility Test

  1. Enter your data. X's should be in several columns and Y should be in the next column.
  2. Go to Stat, Regression , Regression. The following screen should appear.

  1. Enter your Y variable, HrsMTV, as your Response. Enter all of your x's (age, hrstv and hrsnews) as your predictors. Click on o.k.
  2. The following output should appear.

 Regression Analysis: HrsMTV versus Age, HrsTV, HrsNews

 

The regression equation is

HrsMTV = 1.15 - 0.0439 Age + 0.125 HrsTV - 0.101 HrsNews

 

 

Predictor       Coef   SE Coef      T      P

Constant      1.1547    0.4258   2.71  0.008

Age        -0.043896  0.009849  -4.46  0.000

HrsTV        0.12492   0.02101   5.94  0.000

HrsNews     -0.10064   0.05630  -1.79  0.076

 

 

S = 2.25002   R-Sq = 30.8%   R-Sq(adj) = 29.0%

 

 

Analysis of Variance

 

Source           DF       SS      MS      F      P

Regression        3  261.329  87.110  17.21  0.000

Residual Error  116  587.263   5.063

Total           119  848.592

 

 

Source   DF   Seq SS

Age       1   81.761

HrsTV     1  163.387

HrsNews   1   16.180

 

 

Creating Residual Plots

  1. To create a residual plot, go to Stat,  Regression, Regression. Enter your x's and your y's as described above. Then, click on graphs.

 

 

  1. Select either Regular or Standardized.

3.  Then, select Four in One under Residual Plots and put in all of your x’s in the Residual versus variable box.

Note: This will generate a lot of graphs. If you want to close all the graphs, go to Windows- à Close All Windows.

Adding a Squared Term

*   First, label a column for the squared term. Click on Calc, Calculator. The following screen will appear. Put the name of the new column in the first box called Store result in variable.

 

*  In the expression box, enter the expression that you want it to calculate. For instance, HrsTV squared would be HrsTV*HrsTV.

*   Click o.k. Your new variable is in the column.

Prediction Interval for new y and Confidence interval for average y at a combination of x values.

*   Follow the steps above but before you hit o.k. Go to options. The following screen should appear.

 

*   In the box for Prediction Intervals for new observations, enter your new x's.  For instance, if you want age to be 21, hrstv to be 7 and hrsnews to be 1, enter 21 7  1 into the Prediction intervals for new observations box. Make sure that you enter them in the same order as they appear in the predictors box on the previous screen.

*   If you want to change your confidence, enter that as well in the Confidence level box below.

*   Click O.K.

*   Additional lines will be added to your output. It should look similar to the following output below.

*   This will give you both the confidence interval and the prediction interval.

 

Predicted Values for New Observations

 

New

Obs    Fit  SE Fit      95% CI           95% PI

  1  1.007   0.301  (0.410, 1.604)  (-3.490, 5.503)

 

 

Values of Predictors for New Observations

 

New

Obs   Age  HrsTV  HrsNews

  1  21.0   7.00     1.00

 

Prediction Interval for new y and Confidence interval for average y for the entire data set.

*   Follow the steps above but before you hit o.k. Go to options. The following screen should appear.



*   In the box for Prediction Intervals for new observations, double click on the variables listed to the left that appear in the model. Make sure that you list them in the same order as you listed them in the Prediction intervals for new observations window.

*   If you want to change your confidence, enter that as well in the Confidence level box below.

*   Click O.K.

*   Additional lines will be added to your output. It should look similar to the following output below.

*   This will give you both the confidence interval and the prediction interval for every item in the original data set. .

   Predicted Values for New Observations

 

New Obs     Fit  SE Fit       95% CI            95% PI

      1   2.228   0.252  ( 1.729,  2.727)  (-2.256,  6.712)

      2   0.982   0.329  ( 0.331,  1.634)  (-3.521,  5.486)

      3   1.600   0.413  ( 0.782,  2.418)  (-2.931,  6.131)

      4   1.281   0.264  ( 0.758,  1.803)  (-3.206,  5.768)

      5   1.185   0.263  ( 0.665,  1.705)  (-3.302,  5.672)

      6   0.860   0.256  ( 0.353,  1.367)  (-3.625,  5.345)

      7   1.487   0.251  ( 0.989,  1.985)  (-2.997,  5.971)

      8   1.080   0.267  ( 0.550,  1.609)  (-3.408,  5.567)

      9   1.036   0.264  ( 0.512,  1.559)  (-3.451,  5.523)

     10   0.830   0.290  ( 0.256,  1.404)  (-3.664,  5.323)

     11   0.382   0.360  (-0.331,  1.095)  (-4.131,  4.895)

     12   1.962   0.273  ( 1.422,  2.503)  (-2.527,  6.451)

     13   0.805   0.292  ( 0.228,  1.383)  (-3.688,  5.299)

     14   0.955   0.278  ( 0.404,  1.505)  (-3.536,  5.445)

     15   0.257   0.374  (-0.483,  0.998)  (-4.260,  4.775)

     16   0.979   0.286  ( 0.412,  1.545)  (-3.513,  5.471)

     17   1.338   0.279  ( 0.784,  1.891)  (-3.153,  5.828)

     18   2.228   0.252  ( 1.729,  2.727)  (-2.256,  6.712)

     19   0.169   0.375  (-0.574,  0.913)  (-4.349,  4.687)

     20   0.781   0.303  ( 0.182,  1.380)  (-3.715,  5.278)

     21   1.435   0.248  ( 0.943,  1.926)  (-3.049,  5.918)

     22   1.381   0.280  ( 0.828,  1.935)  (-3.109,  5.872)

     23   0.257   0.374  (-0.483,  0.998)  (-4.260,  4.775)

     24   1.180   0.259  ( 0.666,  1.694)  (-3.306,  5.666)

     25   1.036   0.264  ( 0.512,  1.559)  (-3.451,  5.523)

     26   1.560   0.243  ( 1.077,  2.042)  (-2.923,  6.042)

     27   1.330   0.458  ( 0.423,  2.237)  (-3.217,  5.878)

     28   1.805   0.236  ( 1.338,  2.272)  (-2.676,  6.286)

     29   1.285   0.246  ( 0.798,  1.773)  (-3.198,  5.769)

     30   0.882   0.311  ( 0.266,  1.498)  (-3.617,  5.381)

     31   2.071   0.300  ( 1.476,  2.666)  (-2.425,  6.567)

     32   0.720   0.334  ( 0.059,  1.381)  (-3.785,  5.225)

     33   1.780   0.249  ( 1.288,  2.273)  (-2.703,  6.264)

     34   1.136   0.257  ( 0.626,  1.646)  (-3.349,  5.622)

     35   1.535   0.235  ( 1.071,  2.000)  (-2.945,  6.016)

     36   1.681   0.404  ( 0.881,  2.481)  (-2.847,  6.209)

     37   2.507   0.338  ( 1.837,  3.176)  (-2.000,  7.013)

     38   2.897   0.301  ( 2.300,  3.493)  (-1.600,  7.393)

     39   1.603   0.248  ( 1.112,  2.095)  (-2.880,  6.087)

     40   1.031   0.281  ( 0.475,  1.587)  (-3.460,  5.522)

     41   2.076   0.465  ( 1.156,  2.996)  (-2.475,  6.627)

     42   3.079   0.333  ( 2.419,  3.739)  (-1.426,  7.584)

     43   1.733   0.293  ( 1.152,  2.314)  (-2.762,  6.227)

     44   3.082   0.355  ( 2.379,  3.786)  (-1.429,  7.594)

     45   2.232   0.289  ( 1.660,  2.805)  (-2.261,  6.725)

     46   2.531   0.280  ( 1.975,  3.086)  (-1.960,  7.022)

     47   2.579   0.303  ( 1.979,  3.179)  (-1.917,  7.076)

     48   1.330   0.324  ( 0.688,  1.972)  (-3.172,  5.833)

     49   1.882   0.277  ( 1.334,  2.430)  (-2.608,  6.372)

     50   2.998   0.331  ( 2.342,  3.654)  (-1.507,  7.502)

     51   4.831   0.561  ( 3.720,  5.943)  ( 0.238,  9.424)

     52   2.188   0.286  ( 1.622,  2.755)  (-2.304,  6.681)

     53   4.130   0.440  ( 3.259,  5.002)  (-0.411,  8.671)

     54   3.579   0.380  ( 2.825,  4.332)  (-0.941,  8.098)

     55   2.083   0.310  ( 1.470,  2.696)  (-2.415,  6.582)

     56   3.981   0.432  ( 3.126,  4.836)  (-0.557,  8.519)

     57   2.025   0.938  ( 0.168,  3.882)  (-2.803,  6.853)XX

     58   0.939   0.339  ( 0.268,  1.611)  (-3.568,  5.446)

     59   0.939   0.339  ( 0.268,  1.611)  (-3.568,  5.446)

     60   0.939   0.339  ( 0.268,  1.611)  (-3.568,  5.446)

     61   2.188   0.286  ( 1.622,  2.755)  (-2.304,  6.681)

     62   2.232   0.289  ( 1.660,  2.805)  (-2.261,  6.725)

     63   1.531   0.288  ( 0.961,  2.102)  (-2.961,  6.024)

     64   4.409   0.482  ( 3.455,  5.364)  (-0.148,  8.967)

     65   6.573   0.864  ( 4.861,  8.285)  ( 1.799, 11.347)X

     66   3.793   0.400  ( 3.000,  4.585)  (-0.734,  8.319)

     67   5.787   0.705  ( 4.390,  7.183)  ( 1.117, 10.457)

     68   1.689   0.290  ( 1.113,  2.264)  (-2.805,  6.182)

     69   1.588   0.281  ( 1.031,  2.145)  (-2.903,  6.079)

     70   4.755   0.526  ( 3.713,  5.797)  ( 0.178,  9.332)

     71   1.113   0.311  ( 0.497,  1.728)  (-3.386,  5.611)

     72   3.082   0.355  ( 2.379,  3.786)  (-1.429,  7.594)

     73   1.338   0.296  ( 0.752,  1.924)  (-3.157,  5.833)

     74   1.632   0.285  ( 1.067,  2.197)  (-2.860,  6.124)

     75   1.588   0.281  ( 1.031,  2.145)  (-2.903,  6.079)

     76   1.435   0.332  ( 0.778,  2.092)  (-3.069,  5.940)

     77   1.628   0.361  ( 0.914,  2.342)  (-2.885,  6.142)

     78   2.949   0.308  ( 2.338,  3.560)  (-1.549,  7.447)

     79   3.207   0.366  ( 2.483,  3.932)  (-1.308,  7.722)

     80   1.334   0.332  ( 0.676,  1.991)  (-3.171,  5.838)

     81   2.379   0.520  ( 1.350,  3.408)  (-2.195,  6.953)

     82  -0.631   0.408  (-1.438,  0.177)  (-5.160,  3.898)

     83   0.330   0.352  (-0.368,  1.028)  (-4.181,  4.841)

     84   1.592   0.419  ( 0.763,  2.422)  (-2.941,  6.125)

     85  -0.741   0.497  (-1.725,  0.243)  (-5.305,  3.823)

     86   1.610   0.450  ( 0.719,  2.501)  (-2.935,  6.154)

     87   1.634   0.403  ( 0.836,  2.432)  (-2.894,  6.161)

     88  -0.067   0.597  (-1.250,  1.116)  (-4.678,  4.544)

     89   0.192   0.302  (-0.406,  0.790)  (-4.304,  4.688)

     90  -0.027   0.339  (-0.699,  0.644)  (-4.534,  4.479)

     91  -0.935   0.414  (-1.756, -0.115)  (-5.466,  3.596)

     92  -1.044   0.423  (-1.881, -0.206)  (-5.578,  3.491)

     93   1.770   0.531  ( 0.718,  2.821)  (-2.809,  6.349)

     94   1.690   0.737  ( 0.230,  3.151)  (-2.999,  6.380)X

     95   1.580   0.541  ( 0.509,  2.652)  (-3.003,  6.164)

     96   1.282   0.455  ( 0.382,  2.183)  (-3.264,  5.829)

     97   0.028   0.563  (-1.087,  1.143)  (-4.566,  4.622)

     98   4.561   0.845  ( 2.888,  6.234)  (-0.199,  9.321)X

     99  -0.257   0.373  (-0.997,  0.482)  (-4.775,  4.260)

    100  -0.382   0.379  (-1.133,  0.368)  (-4.901,  4.137)

    101  -0.709   0.488  (-1.675,  0.257)  (-5.269,  3.851)

    102  -0.544   0.383  (-1.302,  0.214)  (-5.065,  3.976)

    103   0.020   0.374  (-0.720,  0.761)  (-4.497,  4.538)

    104  -0.867   0.438  (-1.734,  0.001)  (-5.407,  3.673)

    105   0.083   0.468  (-0.844,  1.010)  (-4.469,  4.635)

    106  -0.665   0.481  (-1.618,  0.287)  (-5.222,  3.892)

    107  -0.924   0.394  (-1.705, -0.142)  (-5.448,  3.601)

    108  -0.764   0.416  (-1.588,  0.060)  (-5.296,  3.768)

    109   0.440   0.296  (-0.146,  1.026)  (-4.055,  4.935)

    110  -0.495   0.629  (-1.742,  0.751)  (-5.123,  4.132)

    111   1.404   0.424  ( 0.564,  2.244)  (-3.131,  5.939)

    112   1.009   0.721  (-0.419,  2.437)  (-3.671,  5.689)X

    113  -1.381   0.775  (-2.917,  0.154)  (-6.095,  3.332)X

    114  -0.546   0.429  (-1.397,  0.304)  (-5.083,  3.991)

    115   3.549   0.638  ( 2.285,  4.813)  (-1.083,  8.181)

    116  -2.346   0.738  (-3.809, -0.884)  (-7.036,  2.344)X

    117   0.833   0.389  ( 0.063,  1.604)  (-3.689,  5.356)

    118  -0.036   0.354  (-0.738,  0.666)  (-4.548,  4.475)

    119  -0.467   0.488  (-1.434,  0.499)  (-5.027,  4.093)

    120   0.297   0.360  (-0.417,  1.010)  (-4.217,  4.810)

 

X denotes a point that is an outlier in the predictors.

XX denotes a point that is an extreme outlier in the predictors.

 

 

Values of Predictors for New Observations

 

New Obs   Age  HrsTV  HrsNews

      1  21.0   20.0      5.0

      2  21.0    6.0      0.0

      3  21.0   19.0     10.0

      4  21.0   10.0      2.0

      5  22.0   12.0      5.0

      6  26.0   10.0      4.0

      7  22.0   12.0      2.0

      8  21.0   10.0      4.0

      9  22.0   10.0      4.0

     10  21.0    8.0      4.0

     11  21.0    2.0      1.0

     12  22.0   15.0      1.0

     13  21.0    7.0      3.0

     14  21.0    9.0      4.0

     15  21.0    1.0      1.0

     16  21.0   10.0      5.0

     17  22.0   10.0      1.0

     18  21.0   20.0      5.0

     19  23.0    1.0      1.0

     20  21.0    6.0      2.0

     21  22.0   14.0      5.0

     22  21.0   10.0      1.0

     23  21.0    1.0      1.0

     24  21.0   10.0      3.0

     25  22.0   10.0      4.0

     26  22.0   15.0      5.0

     27  22.0   18.0     11.0

     28  21.0   15.0      3.0

     29  22.0   12.0      4.0

     30  21.0    6.0      1.0

     31  20.0   20.0      7.0

     32  19.0    4.0      1.0

     33  21.0   14.0      2.0

     34  22.0   10.0      3.0

     35  22.0   14.0      4.0

     36  22.0   20.0     10.0

     37  22.0   25.0      8.0

     38  20.0   25.0      5.0

     39  21.0   15.0      5.0

     40  21.0    8.0      2.0

     41  13.0   20.0     10.0

     42  13.0   24.0      5.0

     43  13.0   10.0      1.0

     44  13.0   20.0      0.0

     45  13.0   14.0      1.0

     46  13.0   18.0      3.0

     47  13.0   20.0      5.0