DATA607 Final Presentation - NHL Salary Cap Analysis

John Grando
December 20th, 2017

NHL Salary Cap Structure

plot of chunk unnamed-chunk-5

Player Salaries

plot of chunk unnamed-chunk-6

Player Salaries

plot of chunk unnamed-chunk-7

Curve Fit - Forwards


Call:
glm(formula = CAP.HIT.. ~ CF + Goals + Total.Assists + Shots + 
    Total.Penalties + Minor + Takeaways + Hits.Taken + CF_pp + 
    CA_pp + SCA_pp + HDCF_pp + LDCA_pp + Goals_pp + Total.Assists_pp + 
    Shots_pp + iSCF_pp + iHDCF_pp + SCA_pk + HDCF_pk + HDCA_pk + 
    Total.Assists_pk + iCF_pk + iSCF_pk + Rebounds.Created_pk + 
    Penalties.Drawn_pk, family = Gamma(link = "log"), data = f_train_df)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.2470  -0.2638  -0.0255   0.2118   0.8513  

Coefficients:
                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)          14.2087     0.1867  76.103  < 2e-16 ***
CF                    0.4760     0.2324   2.048 0.041183 *  
Goals               -10.0489     4.3190  -2.327 0.020449 *  
Total.Assists         9.5873     3.3909   2.827 0.004914 ** 
Shots                 2.2237     0.7988   2.784 0.005612 ** 
Total.Penalties     -63.3366    13.0787  -4.843 1.79e-06 ***
Minor                64.4153    13.5545   4.752 2.75e-06 ***
Takeaways             2.6666     1.7598   1.515 0.130449    
Hits.Taken           -2.3178     0.5818  -3.983 7.98e-05 ***
CF_pp                 1.8019     0.4640   3.883 0.000119 ***
CA_pp               -10.1331     5.9970  -1.690 0.091816 .  
SCA_pp               14.7489     7.3924   1.995 0.046662 *  
HDCF_pp              -5.5121     1.7483  -3.153 0.001730 ** 
LDCA_pp              19.6599     7.6634   2.565 0.010645 *  
Goals_pp            -16.2565     8.4995  -1.913 0.056464 .  
Total.Assists_pp     14.7384     5.9731   2.467 0.013998 *  
Shots_pp              9.8613     2.8874   3.415 0.000698 ***
iSCF_pp              -9.9211     3.2312  -3.070 0.002274 ** 
iHDCF_pp              9.0660     3.0494   2.973 0.003115 ** 
SCA_pk               -2.0989     1.2450  -1.686 0.092538 .  
HDCF_pk             -22.8880     7.9500  -2.879 0.004190 ** 
HDCA_pk               5.6729     3.1166   1.820 0.069429 .  
Total.Assists_pk     55.7194    26.9421   2.068 0.039231 *  
iCF_pk              -12.7809     7.6090  -1.680 0.093746 .  
iSCF_pk              19.0641    11.7231   1.626 0.104646    
Rebounds.Created_pk  96.7542    29.8999   3.236 0.001307 ** 
Penalties.Drawn_pk   15.0288     9.1585   1.641 0.101540    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for Gamma family taken to be 0.1137775)

    Null deviance: 119.038  on 453  degrees of freedom
Residual deviance:  52.455  on 427  degrees of freedom
AIC: 14106

Number of Fisher Scoring iterations: 5

Curve Fit - Defense


Call:
glm(formula = CAP.HIT.. ~ Goals + Shots + iSCF + Hits.Taken + 
    Shots.Blocked + CF_pp + SCF_pp + LDCF_pp + Shots_pp + Rebounds.Created_pp + 
    PIM_pp + Total.Penalties_pp + Minor_pp + CA_pk + SCA_pk + 
    LDCA_pk + Total.Assists_pk + PIM_pk + Total.Penalties_pk + 
    Minor_pk + Giveaways_pk, family = Gamma(link = "log"), data = d_train_df)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-1.00038  -0.22529   0.01786   0.21782   0.72854  

Coefficients:
                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)           15.4079     0.1647  93.533  < 2e-16 ***
Goals                -43.5053    13.6619  -3.184  0.00164 ** 
Shots                  3.7504     1.8355   2.043  0.04213 *  
iSCF                  -6.2090     2.7194  -2.283  0.02330 *  
Hits.Taken            -2.5047     0.7526  -3.328  0.00101 ** 
Shots.Blocked         -2.7418     1.1342  -2.417  0.01639 *  
CF_pp                 24.4404    10.4749   2.333  0.02047 *  
SCF_pp               -24.2866    10.8339  -2.242  0.02590 *  
LDCF_pp              -25.2514    10.9237  -2.312  0.02165 *  
Shots_pp              15.1178     5.0835   2.974  0.00324 ** 
Rebounds.Created_pp  -42.5128    18.6720  -2.277  0.02369 *  
PIM_pp                72.2512    35.0528   2.061  0.04037 *  
Total.Penalties_pp  -459.8654   191.7612  -2.398  0.01725 *  
Minor_pp             351.2200   128.4503   2.734  0.00672 ** 
CA_pk                -22.5169     7.7119  -2.920  0.00384 ** 
SCA_pk                24.6426     7.8301   3.147  0.00186 ** 
LDCA_pk               22.1086     8.2589   2.677  0.00795 ** 
Total.Assists_pk      94.3023    39.9053   2.363  0.01893 *  
PIM_pk                56.7550    25.6723   2.211  0.02801 *  
Total.Penalties_pk  -562.6875   200.4699  -2.807  0.00542 ** 
Minor_pk             356.7556   152.0071   2.347  0.01975 *  
Giveaways_pk          24.5560     8.9598   2.741  0.00660 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for Gamma family taken to be 0.1146516)

    Null deviance: 58.450  on 259  degrees of freedom
Residual deviance: 32.468  on 238  degrees of freedom
AIC: 8101

Number of Fisher Scoring iterations: 6

Curve Results - Forwards

plot of chunk unnamed-chunk-11

plot of chunk unnamed-chunk-12

Curve Results - Defense

plot of chunk unnamed-chunk-13

plot of chunk unnamed-chunk-14

Testing and Develoment Results

plot of chunk unnamed-chunk-15

Player Results - Historical - Forwards

Player Team year GP Cap_Hit Estimated_Cap_Hit
Claude_Giroux PHI 2016 78 8275000 9536499
Jason_Spezza DAL 2015 82 7000000 9058724
Alex_Ovechkin WSH 2017 82 9538462 8692597
Tyler_Seguin DAL 2015 71 5750000 8291754
Ryan_O_Reilly BUF 2017 72 7500000 8187712
Jason_Spezza DAL 2016 75 7500000 8016420
Tyler_Seguin DAL 2017 82 5750000 7953395
Phil_Kessel TOR 2015 82 8000000 7935799
Claude_Giroux PHI 2017 82 8275000 7836780
Alex_Ovechkin WSH 2015 81 9538462 7798531
Phil_Kessel PIT 2016 82 8000000 7572535
Joe_Thornton S.J 2016 82 6750000 7527376
Jason_Spezza DAL 2017 68 7500000 7518205
Evgeni_Malkin PIT 2017 62 9500000 7453605

Player Results - Historical - Defense

Player Team year GP Cap_Hit Estimated_Cap_Hit
P_K__Subban MTL 2016 68 9000000 10954811
Keith_Yandle FLA 2017 82 6350000 9352123
Dion_Phaneuf TOR 2015 70 7000000 8852881
Shea_Weber MTL 2017 78 7857143 8819301
Dougie_Hamilton BOS 2015 72 925000 7688128
John_Carlson WSH 2017 72 3966667 7613749
Kris_Letang PIT 2016 71 7250000 7353238
Alexander_Edler VAN 2015 74 5000000 7305675
Drew_Doughty L.A 2017 82 7000000 7257779
Shea_Weber NSH 2015 78 7857143 7082954
Aaron_Ekblad FLA 2017 68 925000 7072747
Oliver_Ekman_Larsson ARI 2016 75 5500000 7044832
Jake_Muzzin L.A 2017 82 4000000 6993346
Brent_Burns S.J 2016 82 5760000 6947536

Player Results - Current - Forward

Player Team year Cap_Hit Estimated_Cap_Hit
Jakub_Voracek PHI 2018 8250000 17932527
Jonathan_Toews CHI 2018 10500000 15682475
Evgeni_Malkin PIT 2018 9500000 11020279
Evgeny_Kuznetsov WSH 2018 7800000 9733922
Jonathan_Drouin MTL 2018 5500000 9508431
Joe_Thornton S.J 2018 8000000 9469489
Mike_Hoffman OTT 2018 5187500 9319404
David_Backes BOS 2018 6000000 9225687
Patrick_Kane CHI 2018 10500000 9144583
Johnny_Gaudreau CGY 2018 6750000 8738026
Patrice_Bergeron BOS 2018 6875000 8357984
Vladimir_Tarasenko STL 2018 7500000 8332791
Blake_Wheeler WPG 2018 5600000 8156201
Steven_Stamkos T.B 2018 8500000 8151298

Player Results - Current - Defense

Player Team year Cap_Hit Estimated_Cap_Hit
Dustin_Byfuglien WPG 2018 7600000 18654542
Roman_Josi NSH 2018 4000000 12868584
P_K__Subban NSH 2018 9000000 12836368
Brad_Hunt VGK 2018 650000 12238751
Duncan_Keith CHI 2018 5538462 9839100
Sami_Vatanen ANA 2018 4875000 9756144
Matt_Tennyson BUF 2018 650000 9441197
Keith_Yandle FLA 2018 6350000 9389085
Kris_Letang PIT 2018 7250000 9269856
Shea_Weber MTL 2018 7857143 8908570
Adam_Pelech NYI 2018 1600000 8905920
Ben_Hutton VAN 2018 2800000 8678523
Rasmus_Ristolainen BUF 2018 5400000 8518337
Karl_Alzner MTL 2018 4625000 8307787

Team Summary

plot of chunk unnamed-chunk-23

Current Team Predictions - glm


Call:
lm(formula = points ~ est_weighted_cap + LDSV. + MDSV. + HDSV., 
    data = team_summary_df)

Residuals:
    Min      1Q  Median      3Q     Max 
-33.815  -8.980   2.360   8.143  26.283 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)      -2.047e+03  4.374e+02  -4.681 1.07e-05 ***
est_weighted_cap  1.020e-05  4.095e-06   2.491  0.01470 *  
LDSV.             1.251e+01  4.417e+00   2.832  0.00578 ** 
MDSV.             6.393e+00  2.094e+00   3.053  0.00303 ** 
HDSV.             2.855e+00  9.299e-01   3.070  0.00287 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 12.15 on 85 degrees of freedom
Multiple R-squared:  0.333, Adjusted R-squared:  0.3016 
F-statistic: 10.61 on 4 and 85 DF,  p-value: 5.089e-07

Current Team Predictions

plot of chunk unnamed-chunk-25

Current Team predictions - full glm

Team Estimated_Cap LDSV_Perc MDSV_Perc HDSV_Perc PDO Points Rank Est_Rank Predicted_Points
WSH 4579948 99.28 96.65 87.86 1.020 35 10.0 1 109.77320
CHI 5688806 98.53 95.80 88.71 1.004 29 22.0 2 108.69379
PHI 4141515 99.09 96.61 89.96 1.017 29 22.0 3 108.66507
ANA 3968388 99.52 96.87 87.55 1.013 30 19.0 4 107.05955
L.A 4044817 98.14 98.06 90.23 1.019 41 2.0 5 105.83647
S.J 4585989 99.36 96.33 86.70 0.979 32 15.5 6 105.47810
NSH 5262799 98.67 95.65 88.39 1.005 39 4.0 7 104.22788
T.B 4447205 98.94 96.11 88.68 1.029 42 1.0 8 103.05582
STL 4737125 98.67 95.99 88.32 1.013 40 3.0 9 100.84051
WPG 5372630 98.91 94.99 87.14 1.010 38 5.0 10 100.56211
VAN 4493144 97.21 97.79 90.60 1.009 32 15.5 11 98.10664
MTL 5273781 98.86 95.82 84.42 0.989 30 19.0 12 96.46904
CAR 4508526 98.82 94.62 89.79 0.991 28 24.0 13 95.82431
CBJ 3915007 98.74 96.73 87.50 1.003 35 10.0 14 95.72130

Current Team predictions - weighted salary

Team Estimated_Cap LDSV_Perc MDSV_Perc HDSV_Perc PDO Points Rank Est_Rank Predicted_Points
CHI 5688806 98.53 95.80 88.71 1.004 29 22.0 2 108.69379
WPG 5372630 98.91 94.99 87.14 1.010 38 5.0 10 100.56211
MTL 5273781 98.86 95.82 84.42 0.989 30 19.0 12 96.46904
NSH 5262799 98.67 95.65 88.39 1.005 39 4.0 7 104.22788
CGY 4993286 97.49 97.27 87.88 0.990 32 15.5 15 95.61992
BUF 4947457 98.37 95.81 83.41 0.971 18 31.0 21 84.06481
STL 4737125 98.67 95.99 88.32 1.013 40 3.0 9 100.84051
VGK 4695134 98.06 97.19 84.47 1.004 35 10.0 18 89.46206
COL 4662615 97.71 97.23 83.64 0.989 26 26.5 23 82.63877
PIT 4611159 98.34 94.03 87.55 0.961 35 10.0 24 80.70054
S.J 4585989 99.36 96.33 86.70 0.979 32 15.5 6 105.47810
WSH 4579948 99.28 96.65 87.86 1.020 35 10.0 1 109.77320
CAR 4508526 98.82 94.62 89.79 0.991 28 24.0 13 95.82431
VAN 4493144 97.21 97.79 90.60 1.009 32 15.5 11 98.10664

Closing Notes

The full analysis is avaialable at: http://rpubs.com/john-grando/Data607_FinalProject

Be kind, rewind… and cache your web scrapes:

#Be kind, rewind.... and cache web scrapes.

load(url("https://github.com/john-grando/data607-finalproject/raw/master/html_files.RData"))