This is a data set of the results of all NFL regular season field goal attempts for the 2008 season. There are 1039 observations with 23 variables The variables are:
GameDate
AwayTeam
HomeTeam
qtr (quarter, 5=overtime)
min (minutes remaining)
sec (seconds remaining, added to minutes)
kickteam (team kicking field goal)
def (defending team)
down
togo (yards to go for 1st down)
kicker (ID #)
ydline (yardline of kicking team)
name (kicker’s name)
distance (yards)
homekick (1 if kicker at Home, 0 if Away)
kickdiff (kicking team lead +, or deficit -, prior to kick)
timerem (Time remaining in seconds, negative = overtime)
offscore (kicking team’s score prior to kick)
defscore (defense team’s score prior to kick)
season (2008)
GOOD (1 is Success, 0 is Miss)
Missed (Missed, not blocked = -1, 0 ow)
Blocked (1 if Blocked, 0 ow)
The variables Missed, Blocked, season, and GameDate are removed from the data set because they do not affect the success of a field goal. The Good variable which measures if a field goal is good is the response varaible.
Using the data, can we make a linear model that correctly predicts if a field goal is a success/good?
First, the following pairwise scatter plots are made to inspect the potential issues with predictor variables and colinearity.
## Warning: package 'psych' was built under R version 4.2.2
The variables that were removed due to colinearity or violating the normality assumption were: yardline, defscore, offscore, kickteam, quater, timerem, homekick and down.
Based on the above exploratory analysis, we first build the full model and the smallest model and then the final model using backward selection. The goodness of fit of these models will be compared to chose the best final model.
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
| Estimate | Std. Error | z value | Pr(>|z|) | |
|---|---|---|---|---|
| (Intercept) | 5.535457e+00 | 2.275154e+00 | 2.433004e+00 | 0.0149741 |
| AwayTeamATL | -1.556454e+00 | 2.387268e+00 | -6.519810e-01 | 0.5144134 |
| AwayTeamBAL | -3.971946e+00 | 5.036447e+00 | -7.886405e-01 | 0.4303222 |
| AwayTeamBUF | -7.125008e+00 | 7.561394e+00 | -9.422876e-01 | 0.3460454 |
| AwayTeamCAR | -9.890033e+00 | 9.549332e+00 | -1.035678e+00 | 0.3003524 |
| AwayTeamCHI | -8.926903e+00 | 1.159639e+01 | -7.698005e-01 | 0.4414182 |
| AwayTeamCIN | -1.363555e+01 | 1.334355e+01 | -1.021883e+00 | 0.3068361 |
| AwayTeamCLE | -1.485387e+01 | 1.520253e+01 | -9.770658e-01 | 0.3285366 |
| AwayTeamDAL | -1.731829e+01 | 1.710124e+01 | -1.012692e+00 | 0.3112073 |
| AwayTeamDEN | -1.986115e+01 | 1.898034e+01 | -1.046406e+00 | 0.2953735 |
| AwayTeamDET | -7.840539e+00 | 1.359663e+02 | -5.766530e-02 | 0.9540152 |
| AwayTeamGB | -2.242242e+01 | 2.275244e+01 | -9.854950e-01 | 0.3243810 |
| AwayTeamHOU | -2.341128e+01 | 2.467544e+01 | -9.487687e-01 | 0.3427383 |
| AwayTeamIND | -2.702596e+01 | 2.656083e+01 | -1.017512e+00 | 0.3089099 |
| AwayTeamJAC | -2.866608e+01 | 2.843761e+01 | -1.008034e+00 | 0.3134381 |
| AwayTeamKC | -3.231267e+01 | 3.031489e+01 | -1.065901e+00 | 0.2864684 |
| AwayTeamMIA | -3.318976e+01 | 3.412020e+01 | -9.727303e-01 | 0.3306873 |
| AwayTeamMIN | -3.459917e+01 | 3.597854e+01 | -9.616612e-01 | 0.3362198 |
| AwayTeamNE | -3.910455e+01 | 3.787649e+01 | -1.032423e+00 | 0.3018742 |
| AwayTeamNO | -4.409573e+01 | 4.170996e+01 | -1.057199e+00 | 0.2904208 |
| AwayTeamNYG | 1.700967e+13 | 3.445357e+14 | 4.936980e-02 | 0.9606246 |
| AwayTeamNYJ | -4.446868e+14 | 4.341656e+14 | -1.024233e+00 | 0.3057252 |
| AwayTeamOAK | -5.163533e+01 | 5.109699e+01 | -1.010536e+00 | 0.3122388 |
| AwayTeamPHI | -5.236801e+01 | 5.298997e+01 | -9.882627e-01 | 0.3230240 |
| AwayTeamPIT | -5.600648e+01 | 5.677777e+01 | -9.864158e-01 | 0.3239291 |
| AwayTeamSD | -5.858989e+01 | 5.867164e+01 | -9.986067e-01 | 0.3179853 |
| AwayTeamSEA | -6.021790e+01 | 6.056500e+01 | -9.942690e-01 | 0.3200919 |
| AwayTeamSF | -6.241997e+01 | 6.244749e+01 | -9.995592e-01 | 0.3175239 |
| AwayTeamSTL | -6.260563e+01 | 6.430006e+01 | -9.736481e-01 | 0.3302313 |
| AwayTeamTB | -6.611665e+01 | 6.623164e+01 | -9.982639e-01 | 0.3181514 |
| AwayTeamTEN | -6.772260e+01 | 6.814420e+01 | -9.938132e-01 | 0.3203138 |
| AwayTeamWAS | -5.607026e+01 | 5.485902e+01 | -1.022079e+00 | 0.3067434 |
| HomeTeamATL | -8.457193e-01 | 2.320184e+00 | -3.645052e-01 | 0.7154808 |
| HomeTeamBAL | -5.237059e+00 | 5.185105e+00 | -1.010020e+00 | 0.3124857 |
| HomeTeamBUF | -8.549868e+00 | 7.711028e+00 | -1.108784e+00 | 0.2675232 |
| HomeTeamCAR | -8.321023e+00 | 9.554322e+00 | -8.709172e-01 | 0.3837994 |
| HomeTeamCHI | -9.240068e+00 | 1.147406e+01 | -8.053008e-01 | 0.4206461 |
| HomeTeamCIN | -1.269760e+01 | 1.330980e+01 | -9.540041e-01 | 0.3400816 |
| HomeTeamCLE | -1.548193e+01 | 1.521054e+01 | -1.017842e+00 | 0.3087528 |
| HomeTeamDAL | -1.480517e+01 | 1.705416e+01 | -8.681268e-01 | 0.3853249 |
| HomeTeamDEN | -1.963814e+01 | 1.902365e+01 | -1.032301e+00 | 0.3019310 |
| HomeTeamDET | -3.856699e+00 | 1.359755e+02 | -2.836320e-02 | 0.9773725 |
| HomeTeamGB | -2.087110e+01 | 2.272722e+01 | -9.183307e-01 | 0.3584457 |
| HomeTeamHOU | -2.340382e+01 | 2.463167e+01 | -9.501519e-01 | 0.3420351 |
| HomeTeamIND | -2.374972e+01 | 2.656899e+01 | -8.938885e-01 | 0.3713815 |
| HomeTeamJAC | -2.801876e+01 | 2.846929e+01 | -9.841750e-01 | 0.3250295 |
| HomeTeamKC | -3.087148e+01 | 3.034373e+01 | -1.017393e+00 | 0.3089667 |
| HomeTeamMIA | -3.394577e+01 | 3.417018e+01 | -9.934324e-01 | 0.3204993 |
| HomeTeamMIN | -3.327315e+01 | 3.598718e+01 | -9.245835e-01 | 0.3551826 |
| HomeTeamNE | -3.760994e+01 | 3.791022e+01 | -9.920792e-01 | 0.3211589 |
| HomeTeamNO | -4.219991e+01 | 4.171806e+01 | -1.011550e+00 | 0.3117532 |
| HomeTeamNYG | 1.700967e+13 | 3.445357e+14 | 4.936980e-02 | 0.9606246 |
| HomeTeamNYJ | -4.446868e+14 | 4.341656e+14 | -1.024233e+00 | 0.3057252 |
| HomeTeamOAK | -5.023005e+01 | 5.114142e+01 | -9.821792e-01 | 0.3260115 |
| HomeTeamPHI | -5.038272e+01 | 5.293466e+01 | -9.517907e-01 | 0.3412031 |
| HomeTeamPIT | -5.586343e+01 | 5.679272e+01 | -9.836372e-01 | 0.3252939 |
| HomeTeamSD | -5.625791e+01 | 5.869768e+01 | -9.584351e-01 | 0.3378434 |
| HomeTeamSEA | -5.876997e+01 | 6.054782e+01 | -9.706372e-01 | 0.3317290 |
| HomeTeamSF | -6.102912e+01 | 6.241582e+01 | -9.777829e-01 | 0.3281817 |
| HomeTeamSTL | -6.291857e+01 | 6.411716e+01 | -9.813062e-01 | 0.3264418 |
| HomeTeamTB | -6.481341e+01 | 6.624534e+01 | -9.783844e-01 | 0.3278842 |
| HomeTeamTEN | -6.644168e+01 | 6.815422e+01 | -9.748726e-01 | 0.3296235 |
| HomeTeamWAS | -5.492697e+01 | 5.485732e+01 | -1.001270e+00 | 0.3166964 |
| min | 1.169800e-03 | 7.131400e-03 | 1.640312e-01 | 0.8697066 |
| sec | 8.748500e-03 | 6.537400e-03 | 1.338232e+00 | 0.1808210 |
| defATL | 2.845128e-01 | 2.403261e+00 | 1.183862e-01 | 0.9057617 |
| defBAL | 6.111634e+00 | 5.209426e+00 | 1.173188e+00 | 0.2407205 |
| defBUF | 8.766517e+00 | 7.794142e+00 | 1.124757e+00 | 0.2606920 |
| defCAR | 9.058731e+00 | 9.574430e+00 | 9.461379e-01 | 0.3440783 |
| defCHI | 8.444654e+00 | 1.151458e+01 | 7.333881e-01 | 0.4633217 |
| defCIN | 1.482772e+01 | 1.338027e+01 | 1.108179e+00 | 0.2677847 |
| defCLE | 1.481924e+01 | 1.524541e+01 | 9.720463e-01 | 0.3310275 |
| defDAL | 1.653002e+01 | 1.704775e+01 | 9.696308e-01 | 0.3322306 |
| defDEN | 2.101824e+01 | 1.903944e+01 | 1.103932e+00 | 0.2696227 |
| defDET | 6.827769e+00 | 1.359700e+02 | 5.021530e-02 | 0.9599509 |
| defGB | 2.128853e+01 | 2.278216e+01 | 9.344387e-01 | 0.3500776 |
| defHOU | 2.381394e+01 | 2.475499e+01 | 9.619858e-01 | 0.3360567 |
| defIND | 2.587322e+01 | 2.659784e+01 | 9.727562e-01 | 0.3306745 |
| defJAC | 2.916836e+01 | 2.849628e+01 | 1.023585e+00 | 0.3060314 |
| defKC | 3.288330e+01 | 3.036123e+01 | 1.083069e+00 | 0.2787780 |
| defMIA | 3.500721e+01 | 3.415395e+01 | 1.024983e+00 | 0.3053713 |
| defMIN | 3.379215e+01 | 3.600769e+01 | 9.384705e-01 | 0.3480027 |
| defNE | 3.728241e+01 | 3.791662e+01 | 9.832734e-01 | 0.3254729 |
| defNO | 4.361795e+01 | 4.172730e+01 | 1.045309e+00 | 0.2958800 |
| defNYG | -1.700967e+13 | 3.445357e+14 | -4.936980e-02 | 0.9606246 |
| defNYJ | 4.446868e+14 | 4.341656e+14 | 1.024233e+00 | 0.3057252 |
| defOAK | 5.142767e+01 | 5.116452e+01 | 1.005143e+00 | 0.3148279 |
| defPHI | 5.255102e+01 | 5.291160e+01 | 9.931853e-01 | 0.3206197 |
| defPIT | 5.624705e+01 | 5.681264e+01 | 9.900447e-01 | 0.3221523 |
| defSD | 5.856069e+01 | 5.873291e+01 | 9.970677e-01 | 0.3187317 |
| defSEA | 6.084801e+01 | 6.055589e+01 | 1.004824e+00 | 0.3149817 |
| defSF | 6.211009e+01 | 6.242307e+01 | 9.949861e-01 | 0.3197430 |
| defSTL | 6.542996e+01 | 6.423115e+01 | 1.018664e+00 | 0.3083625 |
| defTB | 6.673347e+01 | 6.628931e+01 | 1.006700e+00 | 0.3140788 |
| defTEN | 6.549158e+01 | 6.817038e+01 | 9.607044e-01 | 0.3367008 |
| defWAS | 5.572992e+01 | 5.485211e+01 | 1.016003e+00 | 0.3096279 |
| togo | -1.156760e-02 | 2.870510e-02 | -4.029808e-01 | 0.6869623 |
| kicker | 1.861579e+00 | 1.891689e+00 | 9.840831e-01 | 0.3250747 |
| nameC.Barth | -1.816808e+00 | 2.380101e+00 | -7.633322e-01 | 0.4452653 |
| nameD.Rayner | 2.060280e+01 | 4.359682e+05 | 4.730000e-05 | 0.9999623 |
| nameG.Hartley | 4.503600e+15 | 1.862078e+07 | 2.418588e+08 | 0.0000000 |
| nameJ.Carney | -1.700967e+13 | 3.445357e+14 | -4.936980e-02 | 0.9606246 |
| nameJ.Feely | 4.446868e+14 | 4.341656e+14 | 1.024233e+00 | 0.3057252 |
| nameL.Tynes | -1.700967e+13 | 3.445357e+14 | -4.936980e-02 | 0.9606246 |
| nameM.Gramatica | 3.637611e+00 | 2.628972e+00 | 1.383663e+00 | 0.1664617 |
| nameM.Nugent | 4.446868e+14 | 4.341656e+14 | 1.024233e+00 | 0.3057252 |
| nameM.Stover | 8.924217e-01 | 1.922320e+00 | 4.642421e-01 | 0.6424743 |
| distance | -1.445343e-01 | 1.593330e-02 | -9.071209e+00 | 0.0000000 |
| kickdiff | -6.291900e-03 | 1.409080e-02 | -4.465250e-01 | 0.6552181 |
| Estimate | Std. Error | z value | Pr(>|z|) | |
|---|---|---|---|---|
| (Intercept) | 6.4956640 | 0.5703859 | 11.388191 | 0.0000000 |
| distance | -0.1192415 | 0.0123408 | -9.662395 | 0.0000000 |
| sec | 0.0080947 | 0.0054667 | 1.480729 | 0.1386788 |
| Estimate | Std. Error | z value | Pr(>|z|) | |
|---|---|---|---|---|
| (Intercept) | 6.4956640 | 0.5703859 | 11.388191 | 0.0000000 |
| distance | -0.1192415 | 0.0123408 | -9.662395 | 0.0000000 |
| sec | 0.0080947 | 0.0054667 | 1.480729 | 0.1386788 |
| Deviance.residual | Null.Deviance.Residual | AIC | |
|---|---|---|---|
| full.model | 557.9044 | 809.6515 | 775.9044 |
| reduced.model | 684.7092 | 817.7227 | 690.7092 |
| final.model | 684.7092 | 817.7227 | 690.7092 |
Both the reduced model and the final model have the same variables in them so they both have the same AIC, deviance residual, and null deviance residual. Also, both of these models have the best AIC value so I will chose the final model as my model.
In the exploratory analysis, only the variables distance and second are linearly correlated. After automatic variable selection, all the other variables were dropped out of the model besides distance and second so we chose the final model as our model.
Using the information below the final model is \(\hat{y} = 6.496 - 0.119*distance + 0.00809*second\). We interpret this as the distance increases by 1 yard, having a good field goal decreases by 0.119. And as the second increases by 1, having a good field goal increases by 0.00809.
| Estimate | Std. Error | z value | Pr(>|z|) | odds.ratio | |
|---|---|---|---|---|---|
| (Intercept) | 6.4956640 | 0.5703859 | 11.388191 | 0.0000000 | 662.2638362 |
| distance | -0.1192415 | 0.0123408 | -9.662395 | 0.0000000 | 0.8875935 |
| sec | 0.0080947 | 0.0054667 | 1.480729 | 0.1386788 | 1.0081276 |
Because the odds ratio for distance in less than 1, so as the distance increases, the odds of having a successful field goal decrease. Because the odds ratio for second is almost 1, it means that it doesn’t affect the success of a field goal.
The case study focused on the association analysis between a set of potential factors that might influence a field goal’s success. The initial data set has 18 numerical and 5 categorical variables.
After exploratory analysis, some highly correlated values were removed from the model.
After automatic variable selection, the final model was obtained with 2 factors: distance in yards and seconds. As this distance increases, the success of a field goal decreases and as seconds increase the success of a field goal increases.