UNISTAT - the ultimate Excel statistics add-in

Logistic Regression in Excel with Unistat

The Unistat statistics add-in extends Excel with Logistic Regression capabilities.

Further documentation is available at section 7.2.6 of the manual, Logistic Regression.

Sample output

Here we provide annotated example report output from the Unistat Excel statistics add-in for data analysis.

Logistic Regression

Regression Results

Valid Number of Cases: 48, 0 Omitted
Dependent Variable: Status
Minimum of dependent variable is encoded as 0 and the rest as 1.

CoefficientStandard ErrorWald StatisticSignificanceLower 95%Upper 95%
Constant 3.6807 2.7211 1.8297 0.1762-1.6525 9.0139
Age-0.0281 0.0265 1.1231 0.2893-0.0802 0.0239
Sex-0.3571 0.3872 0.8506 0.3564-1.1159 0.4018
BUN 0.0018 0.0047 0.1483 0.7001-0.0074 0.0110
CA 0.1557 0.1224 1.6184 0.2033-0.0842 0.3956
HB-0.1929 0.0685 7.9401 0.0048-0.3272-0.0587
PC-0.0083 0.0060 1.9206 0.1658-0.0200 0.0034
BJ 0.2486 0.3714 0.4481 0.5033-0.4794 0.9766

-2 Log likelihood:
Initial Model 53.9842
Final Model 48.0724
Likelihood Ratio Statistic:
Chi-Square Statistic 5.9118
Degrees of Freedom 7
Right-Tail Probability 0.5501
Goodness of Fit:
Chi-Square Statistic 52.8896
Degrees of Freedom 40
Right-Tail Probability 0.0833

Odds Ratio

Odds RatioStandard ErrorLower 95%Upper 95%
Age 0.9723 0.0258 0.9230 1.0242
Sex 0.6997 0.2709 0.3276 1.4944
BUN 1.0018 0.0047 0.9926 1.0111
CA 1.1685 0.1430 0.9193 1.4853
HB 0.8245 0.0565 0.7210 0.9430
PC 0.9918 0.0059 0.9802 1.0034
BJ 1.2823 0.4763 0.6192 2.6554

Classification by Group

Observed\Predicted01
0 1 11
8.33% 91.67%
1 3 33
8.33% 91.67%

Classification Threshold Probability 0.5000
Sensitivity 91.67%
Specificity 8.33%
Correctly Classified 70.83%

Correlation Matrix of Regression Coefficients

ConstantAgeSexBUNCAHBPCBJ
Constant 1.0000-0.8070-0.5918-0.0644-0.5126-0.4641-0.2739-0.1748
Age-0.8070 1.0000 0.3015-0.0793 0.0798 0.2867 0.2309 0.2090
Sex-0.5918 0.3015 1.0000 0.0298 0.2423 0.3365 0.1035 0.0830
BUN-0.0644-0.0793 0.0298 1.0000 0.1167 0.0263-0.0528-0.1488
CA-0.5126 0.0798 0.2423 0.1167 1.0000-0.1191-0.0986-0.0116
HB-0.4641 0.2867 0.3365 0.0263-0.1191 1.0000 0.2399-0.0495
PC-0.2739 0.2309 0.1035-0.0528-0.0986 0.2399 1.0000 0.1381
BJ-0.1748 0.2090 0.0830-0.1488-0.0116-0.0495 0.1381 1.0000

Covariance Matrix of Regression Coefficients

ConstantAgeSexBUNCAHBPCBJ
Constant 7.4042-0.0583-0.6235-0.0008-0.1707-0.0865-0.0044-0.1767
Age-0.0583 0.0007 0.0031-0.0000 0.0003 0.0005 0.0000 0.0021
Sex-0.6235 0.0031 0.1499 0.0001 0.0115 0.0089 0.0002 0.0119
BUN-0.0008-0.0000 0.0001 0.0000 0.0001 0.0000-0.0000-0.0003
CA-0.1707 0.0003 0.0115 0.0001 0.0150-0.0010-0.0001-0.0005
HB-0.0865 0.0005 0.0089 0.0000-0.0010 0.0047 0.0001-0.0013
PC-0.0044 0.0000 0.0002-0.0000-0.0001 0.0001 0.0000 0.0003
BJ-0.1767 0.0021 0.0119-0.0003-0.0005-0.0013 0.0003 0.1380

Actual and Fitted Values

RowActual *Fitted +
0.0000                                                1.0000
1 1.0000 0.6377
                                      +                    *
**2 0.0000 0.5245
*                              +                            
3 1.0000 0.9038
                                                     +     *
4 1.0000 0.8391
                                                  +        *
**5 1.0000 0.4985
                             +                             *
**6 0.0000 0.6363
*                                     +                     
7 1.0000 0.8737
                                                    +      *
**8 0.0000 0.5320
*                              +                            
9 1.0000 0.9271
                                                       +   *
10 1.0000 0.8083
                                                +          *
11 1.0000 0.7050
                                          +                *
12 1.0000 0.8836
                                                    +      *
13 1.0000 0.9027
                                                     +     *
14 1.0000 0.8725
                                                   +       *
**15 0.0000 0.7482
*                                           +               
16 1.0000 0.6706
                                        +                  *
**17 0.0000 0.7353
*                                          +                
**18 1.0000 0.4853
                             +                             *
**19 0.0000 0.7736
*                                             +             
**20 0.0000 0.5226
*                              +                            
21 1.0000 0.5758
                                  +                        *
22 1.0000 0.6018
                                    +                      *
23 1.0000 0.7829
                                              +            *
24 1.0000 0.8485
                                                  +        *
**25 0.0000 0.6371
*                                     +                     
26 1.0000 0.9558
                                                        +  *
27 1.0000 0.7394
                                            +              *
28 1.0000 0.6258
                                     +                     *
29 1.0000 0.8652
                                                   +       *
30 1.0000 0.9775
                                                          +*
31 1.0000 0.8993
                                                     +     *
32 1.0000 0.7696
                                             +             *
33 1.0000 0.8460
                                                  +        *
34 1.0000 0.6804
                                        +                  *
35 1.0000 0.6294
                                     +                     *
36 1.0000 0.8433
                                                  +        *
**37 0.0000 0.6042
*                                   +                       
38 1.0000 0.9447
                                                        +  *
39 0.0000 0.3326
*                   +                                       
40 1.0000 0.8454
                                                  +        *
41 1.0000 0.8037
                                               +           *
**42 1.0000 0.4949
                             +                             *
43 1.0000 0.8596
                                                   +       *
44 1.0000 0.7915
                                               +           *
**45 0.0000 0.8404
*                                                 +         
46 1.0000 0.9428
                                                        +  *
47 1.0000 0.8216
                                                +          *
**48 0.0000 0.9469
*                                                       +   

Cases marked by '**' are misclassified.

Residuals

RowResiduals
-0.9469                                               0.9469
1 0.3623
                                         *                  
2-0.5245
             *                                              
3 0.0962
                                *                           
4 0.1609
                                   *                        
5 0.5015
                                             *              
6-0.6363
          *                                                 
7 0.1263
                                 *                          
8-0.5320
             *                                              
9 0.0729
                                *                           
10 0.1917
                                   *                        
11 0.2950
                                       *                    
12 0.1164
                                 *                          
13 0.0973
                                 *                          
14 0.1275
                                 *                          
15-0.7482
      *                                                     
16 0.3294
                                        *                   
17-0.7353
       *                                                    
18 0.5147
                                              *             
19-0.7736
     *                                                      
20-0.5226
             *                                              
21 0.4242
                                           *                
22 0.3982
                                          *                 
23 0.2171
                                    *                       
24 0.1515
                                  *                         
25-0.6371
          *                                                 
26 0.0442
                               *                            
27 0.2606
                                      *                     
28 0.3742
                                         *                  
29 0.1348
                                  *                         
30 0.0225
                              *                             
31 0.1007
                                 *                          
32 0.2304
                                     *                      
33 0.1540
                                  *                         
34 0.3196
                                       *                    
35 0.3706
                                         *                  
36 0.1567
                                  *                         
37-0.6042
           *                                                
38 0.0553
                               *                            
39-0.3326
                   *                                        
40 0.1546
                                  *                         
41 0.1963
                                    *                       
42 0.5051
                                             *              
43 0.1404
                                  *                         
44 0.2085
                                    *                       
45-0.8404
   *                                                        
46 0.0572
                               *                            
47 0.1784
                                   *                        
48-0.9469
*                                                           

Case (Diagnostic) Statistics

RowFitted ValuesPredicted GroupLeverageCook's DistanceDevianceResidualsStandardised ResidualsLogit ResidualsStudentised Residuals
1 0.6377 1.0000 0.0415 0.0246 0.9485 0.3623 0.7537 1.5680 0.9688
2 0.5245 1.0000 0.0529 0.0616-1.2193-0.5245-1.0503-2.1031-1.2529
3 0.9038 1.0000 0.0284 0.0031 0.4498 0.0962 0.3263 1.1065 0.4563
4 0.8391 1.0000 0.0213 0.0042 0.5924 0.1609 0.4380 1.1918 0.5988
5 0.4985 0.0000 0.0323 0.0336 1.1800 0.5015 1.0031 2.0062 1.1996
6 0.6363 1.0000 0.0339 0.0614-1.4222-0.6363-1.3226-2.7493-1.4469
7 0.8737 1.0000 0.0227 0.0034 0.5196 0.1263 0.3802 1.1445 0.5256
8 0.5320 1.0000 0.0554 0.0666-1.2323-0.5320-1.0662-2.1369-1.2679
9 0.9271 1.0000 0.0112 0.0009 0.3891 0.0729 0.2804 1.0786 0.3912
10 0.8083 1.0000 0.0151 0.0036 0.6525 0.1917 0.4870 1.2372 0.6574
11 0.7050 1.0000 0.0151 0.0064 0.8362 0.2950 0.6469 1.4185 0.8425
12 0.8836 1.0000 0.0608 0.0085 0.4976 0.1164 0.3630 1.1318 0.5134
13 0.9027 1.0000 0.0172 0.0019 0.4524 0.0973 0.3283 1.1078 0.4564
14 0.8725 1.0000 0.0128 0.0019 0.5223 0.1275 0.3822 1.1461 0.5256
15 0.7482 1.0000 0.0193 0.0584-1.6607-0.7482-1.7236-3.9710-1.6770
16 0.6706 1.0000 0.0440 0.0226 0.8940 0.3294 0.7009 1.4913 0.9143
17 0.7353 1.0000 0.0436 0.1265-1.6304-0.7353-1.6667-3.7780-1.6672
18 0.4853 0.0000 0.0393 0.0434 1.2026 0.5147 1.0299 2.0607 1.2269
19 0.7736 1.0000 0.0326 0.1150-1.7235-0.7736-1.8483-4.4160-1.7523
20 0.5226 1.0000 0.0453 0.0519-1.2161-0.5226-1.0463-2.0948-1.2446
21 0.5758 1.0000 0.0457 0.0353 1.0507 0.4242 0.8583 1.7367 1.0756
22 0.6018 1.0000 0.0233 0.0158 1.0078 0.3982 0.8135 1.6617 1.0198
23 0.7829 1.0000 0.0279 0.0080 0.6997 0.2171 0.5266 1.2773 0.7097
24 0.8485 1.0000 0.0215 0.0039 0.5732 0.1515 0.4226 1.1786 0.5795
25 0.6371 1.0000 0.0494 0.0911-1.4237-0.6371-1.3248-2.7552-1.4602
26 0.9558 1.0000 0.0097 0.0005 0.3005 0.0442 0.2149 1.0462 0.3020
27 0.7394 1.0000 0.1009 0.0396 0.7771 0.2606 0.5937 1.3525 0.8196
28 0.6258 1.0000 0.0840 0.0549 0.9682 0.3742 0.7732 1.5979 1.0116
29 0.8652 1.0000 0.0263 0.0042 0.5381 0.1348 0.3947 1.1558 0.5453
30 0.9775 1.0000 0.0085 0.0002 0.2131 0.0225 0.1516 1.0230 0.2140
31 0.8993 1.0000 0.0169 0.0019 0.4607 0.1007 0.3346 1.1119 0.4646
32 0.7696 1.0000 0.0892 0.0293 0.7237 0.2304 0.5471 1.2993 0.7583
33 0.8460 1.0000 0.0178 0.0033 0.5783 0.1540 0.4267 1.1820 0.5836
34 0.6804 1.0000 0.0463 0.0228 0.8776 0.3196 0.6853 1.4697 0.8986
35 0.6294 1.0000 0.0313 0.0190 0.9623 0.3706 0.7674 1.5889 0.9778
36 0.8433 1.0000 0.0235 0.0045 0.5838 0.1567 0.4310 1.1858 0.5908
37 0.6042 1.0000 0.0356 0.0564-1.3615-0.6042-1.2356-2.5266-1.3865
38 0.9447 1.0000 0.0214 0.0013 0.3372 0.0553 0.2419 1.0585 0.3408
39 0.3326 0.0000 0.0664 0.0354-0.8992-0.3326-0.7059-1.4983-0.9306
40 0.8454 1.0000 0.0301 0.0057 0.5795 0.1546 0.4276 1.1828 0.5884
41 0.8037 1.0000 0.0345 0.0087 0.6611 0.1963 0.4942 1.2442 0.6728
42 0.4949 0.0000 0.0666 0.0728 1.1861 0.5051 1.0102 2.0206 1.2277
43 0.8596 1.0000 0.0171 0.0028 0.5501 0.1404 0.4041 1.1633 0.5548
44 0.7915 1.0000 0.0399 0.0109 0.6838 0.2085 0.5132 1.2634 0.6979
45 0.8404 1.0000 0.0238 0.1287-1.9159-0.8404-2.2950-6.2669-1.9391
46 0.9428 1.0000 0.0102 0.0006 0.3431 0.0572 0.2462 1.0606 0.3449
47 0.8216 1.0000 0.0228 0.0051 0.6269 0.1784 0.4660 1.2172 0.6342
48 0.9469 1.0000 0.0110 0.1987-2.4229-0.9469-4.2222-18.8267-2.4364
RowDelta-Beta ConstantDelta-Beta AgeDelta-Beta SexDelta-Beta BUNDelta-Beta CADelta-Beta HBDelta-Beta PCDelta-Beta BJ
1-0.1184 0.0015-0.0024-0.0001-0.0027 0.0061-0.0001 0.0320
2 0.2421-0.0022 0.0062 0.0002-0.0024-0.0067-0.0012 0.0124
3-0.0468-0.0002 0.0111-0.0000 0.0047 0.0002-0.0000 0.0079
4-0.0244 0.0007-0.0057-0.0001-0.0006-0.0003-0.0000 0.0171
5-0.0863 0.0012-0.0118-0.0001-0.0047 0.0077 0.0006-0.0195
6-0.2655 0.0021-0.0293 0.0003 0.0168-0.0026-0.0001 0.0273
7 0.0895-0.0009-0.0088-0.0000-0.0011-0.0001-0.0001 0.0073
8-0.0083-0.0005 0.0161 0.0001 0.0144-0.0092-0.0008-0.0480
9-0.0174 0.0002-0.0029 0.0000 0.0022-0.0010-0.0000-0.0023
10-0.0481 0.0006-0.0053 0.0000 0.0027 0.0001-0.0001-0.0081
11-0.0218 0.0007-0.0109 0.0000-0.0010 0.0014 0.0000-0.0125
12 0.0384-0.0009 0.0071 0.0004-0.0003 0.0001-0.0000 0.0050
13 0.0909-0.0006-0.0110-0.0000-0.0018-0.0018 0.0000-0.0043
14 0.0795-0.0006-0.0103-0.0000-0.0006-0.0011-0.0001-0.0070
15 0.0839-0.0015-0.0530 0.0001 0.0035-0.0004 0.0004 0.0245
16 0.1559-0.0021 0.0148-0.0001-0.0049 0.0007 0.0004-0.0149
17-0.6668 0.0055 0.0624 0.0002 0.0175-0.0031 0.0010 0.0567
18-0.1352 0.0022 0.0437-0.0001-0.0122 0.0065 0.0003-0.0128
19 0.0205 0.0018 0.0178 0.0001-0.0178-0.0067 0.0010 0.0523
20 0.2409-0.0021 0.0048 0.0002-0.0027-0.0074-0.0010 0.0150
21-0.0085 0.0010-0.0120-0.0002-0.0108 0.0067 0.0003 0.0391
22-0.0439 0.0011-0.0120-0.0002-0.0028 0.0040 0.0001-0.0150
23-0.0682 0.0004 0.0202-0.0001 0.0010 0.0007 0.0001 0.0228
24 0.0138 0.0006-0.0105 0.0000-0.0019-0.0018 0.0001-0.0033
25 0.2730-0.0047 0.0076-0.0001 0.0115-0.0087-0.0002-0.0633
26 0.0236-0.0003-0.0034 0.0000 0.0012-0.0007-0.0000-0.0029
27-0.1312-0.0013 0.0028-0.0000 0.0168 0.0033 0.0004-0.0169
28-0.1553 0.0017 0.0362 0.0008-0.0053 0.0045-0.0001-0.0214
29 0.1594-0.0013-0.0151-0.0000-0.0030-0.0013-0.0001-0.0095
30-0.0153 0.0001-0.0002-0.0000 0.0011-0.0004-0.0000 0.0023
31-0.0001 0.0003 0.0048-0.0000-0.0000-0.0016-0.0001-0.0017
32-0.0457 0.0003-0.0093 0.0007 0.0008 0.0004 0.0004-0.0150
33 0.0533-0.0001-0.0093-0.0000-0.0028-0.0002-0.0001 0.0124
34 0.0003 0.0022-0.0183-0.0002-0.0097-0.0001-0.0000-0.0063
35 0.0812-0.0007-0.0152-0.0001-0.0031 0.0045-0.0003-0.0228
36-0.0589 0.0000 0.0161-0.0000 0.0033 0.0006-0.0001 0.0138
37 0.4196-0.0036-0.0691 0.0001-0.0051-0.0071-0.0000 0.0156
38 0.0476-0.0003-0.0063-0.0000-0.0012-0.0014 0.0001 0.0059
39 0.2048-0.0008-0.0409 0.0001 0.0005-0.0082-0.0008 0.0099
40-0.0000-0.0000 0.0080-0.0001 0.0010-0.0021 0.0003-0.0018
41-0.1510 0.0014 0.0010 0.0001 0.0063 0.0010-0.0001-0.0081
42 0.0349-0.0015 0.0461-0.0001-0.0064 0.0111-0.0006-0.0351
43 0.0051-0.0002 0.0091-0.0000 0.0015-0.0006-0.0002-0.0065
44-0.0205 0.0003 0.0143-0.0001-0.0022-0.0009 0.0004 0.0252
45 0.2194-0.0040-0.0522-0.0001 0.0007 0.0096-0.0005 0.0090
46 0.0209-0.0002 0.0019-0.0000 0.0006-0.0011-0.0001-0.0020
47 0.0540-0.0001 0.0073-0.0000-0.0031-0.0012-0.0002-0.0068
48-0.4548 0.0041 0.0639-0.0011-0.0007 0.0085 0.0013-0.0527

Logistic Regression

Logistic Regression