This suite of functions provides the basic quantities which are used in forming a wide variety of diagnostics for checking the quality of regression fits.
# S3 method for cmp
influence(model, ...)
# S3 method for cmp
hatvalues(model, ...)
# S3 method for cmp
rstandard(
model,
infl = influence.cmp(model),
type = c("deviance", "pearson"),
...
)
# S3 method for cmp
cooks.distance(
model,
infl = influence(model),
res = infl$pear_res,
hat = infl$hat,
...
)
an object class 'cmp', obtained from a call to glm.cmp
.
other arguments passed to or from other methods (currently unused).
influence structure as returned by influence
, only for rstudent
and cooks.distance
.
type of residuals for rstandard
. The alternatives are: 'deviance' (default), and 'pearson'.
residuals, with proper default.
hat values \(H[i,i]\), see default.
data(attendance)
M.attendance <- glm.cmp(daysabs ~ gender + math + prog, data = attendance)
influence(M.attendance)
#> $hat
#> 1 2 3 4 5 6
#> 0.011522826 0.010632762 0.012781979 0.014026782 0.020060944 0.013743374
#> 7 8 9 10 11 12
#> 0.011673461 0.018385262 0.009677632 0.012421446 0.016174717 0.011662762
#> 13 14 15 16 17 18
#> 0.014363244 0.033768516 0.023438692 0.020310794 0.010023061 0.009918403
#> 19 20 21 22 23 24
#> 0.034193693 0.017916764 0.012503109 0.011113567 0.009296424 0.011522826
#> 25 26 27 28 29 30
#> 0.013073723 0.029299980 0.017018889 0.012503109 0.013265513 0.034898031
#> 31 32 33 34 35 36
#> 0.019361679 0.010728634 0.009318289 0.009351265 0.012718944 0.012781979
#> 37 38 39 40 41 42
#> 0.015378083 0.018141281 0.042465748 0.009918403 0.010268663 0.010023061
#> 43 44 45 46 47 48
#> 0.009574398 0.010303700 0.012158819 0.011096973 0.014473169 0.009395411
#> 49 50 51 52 53 54
#> 0.011904732 0.017240080 0.013297412 0.010744452 0.009450192 0.010278486
#> 55 56 57 58 59 60
#> 0.019035246 0.010415896 0.040116866 0.041261490 0.011983755 0.009918403
#> 61 62 63 64 65 66
#> 0.009785415 0.011096973 0.014281252 0.009351983 0.010563026 0.009897634
#> 67 68 69 70 71 72
#> 0.031516124 0.014727607 0.016174717 0.009632303 0.013850385 0.016193251
#> 73 74 75 76 77 78
#> 0.021160080 0.011214950 0.012184512 0.036508078 0.009684665 0.012460155
#> 79 80 81 82 83 84
#> 0.019361679 0.012503109 0.010139793 0.015830800 0.036497012 0.010744452
#> 85 86 87 88 89 90
#> 0.014798638 0.032715111 0.009691064 0.015097828 0.014151025 0.010632762
#> 91 92 93 94 95 96
#> 0.011096973 0.013448622 0.023707878 0.031582974 0.016288486 0.013940823
#> 97 98 99 100 101 102
#> 0.012158819 0.014999825 0.009285618 0.018866885 0.032109019 0.009450767
#> 103 104 105 106 107 108
#> 0.014281252 0.018385262 0.032060750 0.011096973 0.043390950 0.011260416
#> 109 110 111 112 113 114
#> 0.009296989 0.009595343 0.015830800 0.019541137 0.011904732 0.010814958
#> 115 116 117 118 119 120
#> 0.009296989 0.009584873 0.009918403 0.039102171 0.019803602 0.018385262
#> 121 122 123 124 125 126
#> 0.017018889 0.039032834 0.014281252 0.018141281 0.020770706 0.013743374
#> 127 128 129 130 131 132
#> 0.035577295 0.009541069 0.011673461 0.010023061 0.009524195 0.010728634
#> 133 134 135 136 137 138
#> 0.019541137 0.009595343 0.030218334 0.011662762 0.017240080 0.014363244
#> 139 140 141 142 143 144
#> 0.012987415 0.031233625 0.015097828 0.015368185 0.039667426 0.010744452
#> 145 146 147 148 149 150
#> 0.010728634 0.010562515 0.009511054 0.010038287 0.011983755 0.030710985
#> 151 152 153 154 155 156
#> 0.009318289 0.009515372 0.029043900 0.030408634 0.033143135 0.038510493
#> 157 158 159 160 161 162
#> 0.009450767 0.009882073 0.016174717 0.011939315 0.011939315 0.011904634
#> 163 164 165 166 167 168
#> 0.016769719 0.009541069 0.012383791 0.012055711 0.012383791 0.012434894
#> 169 170 171 172 173 174
#> 0.013045219 0.013448622 0.014999321 0.011904634 0.011999583 0.010906595
#> 175 176 177 178 179 180
#> 0.013045219 0.011999583 0.012718209 0.025288351 0.012101869 0.013211355
#> 181 182 183 184 185 186
#> 0.010562515 0.028461204 0.018443160 0.014151025 0.012718209 0.013634171
#> 187 188 189 190 191 192
#> 0.028588755 0.012948486 0.011971825 0.028537888 0.013010582 0.013506390
#> 193 194 195 196 197 198
#> 0.019976533 0.014026782 0.025926912 0.031861247 0.012747763 0.010562515
#> 199 200 201 202 203 204
#> 0.012625689 0.014999321 0.012434894 0.019576776 0.016174717 0.011935192
#> 205 206 207 208 209 210
#> 0.009511054 0.014883824 0.033768516 0.016699590 0.028731545 0.012227377
#> 211 212 213 214 215 216
#> 0.012045614 0.013799394 0.029959091 0.011935192 0.013211355 0.012747763
#> 217 218 219 220 221 222
#> 0.024426372 0.011260416 0.013743374 0.012131868 0.009541069 0.013297412
#> 223 224 225 226 227 228
#> 0.019187985 0.010415896 0.009842340 0.014473169 0.013473768 0.014730565
#> 229 230 231 232 233 234
#> 0.012096107 0.025926912 0.011673461 0.012131868 0.012520978 0.013045219
#> 235 236 237 238 239 240
#> 0.030817136 0.016462083 0.019976533 0.036839184 0.010462363 0.019976533
#> 241 242 243 244 245 246
#> 0.017078742 0.015023251 0.012071143 0.013829159 0.009897634 0.013612897
#> 247 248 249 250 251 252
#> 0.012184512 0.010268663 0.009684665 0.012227377 0.013819929 0.013473768
#> 253 254 255 256 257 258
#> 0.010728634 0.013155728 0.015723006 0.012304054 0.013310029 0.012248539
#> 259 260 261 262 263 264
#> 0.012096107 0.012421446 0.009745113 0.011999583 0.028967609 0.009632303
#> 265 266 267 268 269 270
#> 0.044087543 0.015360646 0.014730565 0.012794686 0.010562515 0.011903398
#> 271 272 273 274 275 276
#> 0.032910962 0.012434894 0.018127940 0.012574066 0.012043854 0.010415896
#> 277 278 279 280 281 282
#> 0.013045219 0.012110838 0.012574066 0.014151025 0.017733741 0.013211355
#> 283 284 285 286 287 288
#> 0.013010582 0.013506390 0.029125634 0.013470124 0.012747763 0.009918403
#> 289 290 291 292 293 294
#> 0.012071143 0.012948486 0.014381797 0.009296424 0.015892956 0.014634232
#> 295 296 297 298 299 300
#> 0.011903398 0.025926912 0.031307972 0.015110002 0.012434894 0.014999321
#> 301 302 303 304 305 306
#> 0.012300176 0.010415896 0.013010582 0.017741649 0.011935192 0.017149517
#> 307 308 309 310 311 312
#> 0.011935192 0.012055711 0.013019187 0.010814958 0.013506390 0.010889960
#> 313 314
#> 0.015684206 0.013211355
#>
#> $dev_res
#> 1 2 3 4 5 6
#> -0.264431074 -0.464137281 -1.137050871 -0.907077200 -0.975542014 0.836872760
#> 7 8 9 10 11 12
#> 0.561358197 -0.108788269 0.605119157 1.468062967 0.114354541 -0.304941432
#> 13 14 15 16 17 18
#> -0.205905345 -0.413390154 -0.834216748 -1.884087208 -1.420603912 -2.150003818
#> 19 20 21 22 23 24
#> -0.375219098 1.468969477 -1.132530107 -1.968586289 -1.254485900 -1.962546736
#> 25 26 27 28 29 30
#> -0.090579782 -0.343694864 -0.090124242 -2.192511868 -0.747483510 -0.759671110
#> 31 32 33 34 35 36
#> -2.150129933 -1.440686698 -0.616246064 -2.035063902 -1.947450398 1.559609175
#> 37 38 39 40 41 42
#> 0.069638366 0.063670003 -0.794306121 1.640264461 -0.441466899 0.990429617
#> 43 44 45 46 47 48
#> 1.120302628 0.324433104 0.262711667 -0.646728292 -0.728359917 -0.626501101
#> 49 50 51 52 53 54
#> 0.269537103 1.565492576 -0.175745712 -1.974626551 2.108172042 0.610269764
#> 55 56 57 58 59 60
#> 1.745950073 -1.188726129 1.116960049 -0.395382553 -0.872605685 -1.068970210
#> 61 62 63 64 65 66
#> -1.287173909 -0.170327499 -0.540058333 0.308774570 -0.294816047 1.086435269
#> 67 68 69 70 71 72
#> -0.702750468 -0.715281110 -0.146945135 -0.350633588 -1.935376003 0.679889428
#> 73 74 75 76 77 78
#> -1.712453448 0.161463198 -1.694337735 0.007218051 -0.425820919 -0.761790217
#> 79 80 81 82 83 84
#> 2.117266728 1.246871531 0.546128358 0.210352864 -0.903468604 0.089283785
#> 85 86 87 88 89 90
#> -1.926321848 0.039332897 0.459385914 0.205096506 0.657176598 -0.109085595
#> 91 92 93 94 95 96
#> 1.300390294 -0.223460354 0.137758141 1.456204619 -0.273958800 -1.364326066
#> 97 98 99 100 101 102
#> 0.262711667 0.430279514 1.350221661 0.469534407 -0.522836665 -2.041111474
#> 103 104 105 106 107 108
#> -0.540058333 0.263758316 1.092101012 -1.448709148 -0.234862150 -0.682397642
#> 109 110 111 112 113 114
#> -2.019948142 0.365951109 1.277017827 -0.316132980 -0.713006450 0.424810297
#> 115 116 117 118 119 120
#> 0.784627689 -0.193545860 2.117705278 0.121611810 -0.548959305 0.263758316
#> 121 122 123 124 125 126
#> -0.235700562 -0.709293779 -1.014259645 0.249112005 0.100598928 0.836872760
#> 127 128 129 130 131 132
#> -0.640162679 -0.390538960 -0.672232678 1.817248585 0.913757200 0.699075374
#> 133 134 135 136 137 138
#> 0.233655043 -1.279013653 -0.795132958 0.010430593 -1.229716312 0.518167424
#> 139 140 141 142 143 144
#> -0.465617685 1.118708331 -1.168627540 0.876233485 -0.942730591 -0.087759694
#> 145 146 147 148 149 150
#> -0.458350150 -0.485698497 -0.768160774 1.311929277 0.375667084 1.339704397
#> 151 152 153 154 155 156
#> -0.029313161 1.035007521 0.339418750 -0.109086198 0.140367358 0.290978322
#> 157 158 159 160 161 162
#> -2.041111474 -1.205215235 0.114354541 -1.586940919 -1.586940919 -0.148942096
#> 163 164 165 166 167 168
#> -0.898463764 -1.041569710 -1.545383978 -1.682353331 -1.545383978 1.009923067
#> 169 170 171 172 173 174
#> -0.054955868 0.373189254 0.934064179 0.496978603 -0.593956415 -0.164176380
#> 175 176 177 178 179 180
#> -1.527629566 -1.563172861 0.371421139 -0.607567393 -1.688344561 0.396413424
#> 181 182 183 184 185 186
#> -0.968001889 0.762113464 -0.919828507 -1.506963292 -0.708108682 2.799195821
#> 187 188 189 190 191 192
#> -0.191591768 2.382483290 -1.956507754 -0.040627451 -0.686403720 -0.221118042
#> 193 194 195 196 197 198
#> -0.207509001 -0.704780024 -0.771112840 -0.311721814 1.084637047 -2.083341902
#> 199 200 201 202 203 204
#> -1.287004453 -0.646701799 -1.649439652 1.509090138 -0.889902479 -1.569109939
#> 205 206 207 208 209 210
#> -1.380318641 -1.655543117 -0.737625005 -1.577897927 -0.923515019 -1.658409420
#> 211 212 213 214 215 216
#> -0.313230612 -1.512862674 -0.810463816 -1.569109939 0.396413424 0.129435772
#> 217 218 219 220 221 222
#> -0.842835423 -2.071235715 -1.270675614 0.321699153 -1.392421453 0.235490192
#> 223 224 225 226 227 228
#> -1.793459839 -0.298181249 0.115641853 1.134231945 -1.634626394 -1.498122668
#> 229 230 231 232 233 234
#> -1.557239505 -1.956382157 -0.940218319 0.562471921 -0.716849444 -1.527629566
#> 235 236 237 238 239 240
#> -0.986564728 -1.237923996 -0.518811704 -0.519898332 -0.270261198 -0.207509001
#> 241 242 243 244 245 246
#> -0.764958562 -0.610898799 0.763201440 1.215125037 1.507273755 -1.360281579
#> 247 248 249 250 251 252
#> 0.898860229 -0.441466899 -1.283094798 -0.734306581 -1.736340335 0.383646908
#> 253 254 255 256 257 258
#> -2.168211817 2.150848442 -0.874955093 -0.353811807 -0.399196404 -1.604801029
#> 259 260 261 262 263 264
#> -0.585109718 2.815367023 -1.059847630 1.930267111 -0.937998505 -0.350633588
#> 265 266 267 268 269 270
#> 0.807025994 -1.757370839 0.943779506 0.298195251 -0.968001889 -0.138549467
#> 271 272 273 274 275 276
#> 0.041945577 -1.649439652 0.239841718 -1.539461808 -0.589533974 0.520796485
#> 277 278 279 280 281 282
#> -0.540773558 -1.598844529 -1.539461808 -0.509640721 1.093264960 0.112424781
#> 283 284 285 286 287 288
#> -1.625671567 -0.681838324 -0.086190358 -0.838347741 -0.677635501 -0.120940883
#> 289 290 291 292 293 294
#> 0.763201440 -1.634502264 1.302245847 -2.029017025 -0.885618386 -2.116780895
#> 295 296 297 298 299 300
#> 0.509676380 1.464884469 0.126092896 -1.754365335 -1.649439652 -0.646701799
#> 301 302 303 304 305 306
#> 0.268845181 -1.188726129 -0.226477923 -0.489101490 -0.128143871 -0.575296250
#> 307 308 309 310 311 312
#> 0.227929391 0.928302096 -0.825410215 -1.315675572 0.123920648 -2.077288403
#> 313 314
#> -1.589792047 -0.231406997
#>
#> $pear_res
#> 1 2 3 4 5 6
#> -0.243678887 -0.402285493 -0.791080936 -0.683891284 -0.721028331 1.051034815
#> 7 8 9 10 11 12
#> 0.656271872 -0.105384543 0.717390353 2.203677027 0.118457256 -0.278091596
#> 13 14 15 16 17 18
#> -0.193462042 -0.365945421 -0.628111600 -0.947929326 -0.888703483 -1.015626657
#> 19 20 21 22 23 24
#> -0.335054658 2.119655380 -0.788975871 -0.969648750 -0.824624402 -0.968111696
#> 25 26 27 28 29 30
#> -0.088251598 -0.310479521 -0.087780870 -1.026576859 -0.586218835 -0.598532086
#> 31 32 33 34 35 36
#> -1.015658970 -0.896099200 -0.507388506 -0.986481935 -0.964261483 2.280621557
#> 37 38 39 40 41 42
#> 0.071051273 0.064909350 -0.628345958 2.451497363 -0.386516970 1.282200609
#> 43 44 45 46 47 48
#> 1.496837413 0.355862739 0.283132465 -0.530553090 -0.574722151 -0.514194859
#> 49 50 51 52 53 54
#> 0.291054804 2.335522499 -0.166805579 -0.971184053 3.520652055 0.721917005
#> 55 56 57 58 59 60
#> 2.635343601 -0.797522503 1.464433688 -0.353448102 -0.664618575 -0.758802655
#> 61 62 63 64 65 66
#> -0.837696875 -0.162070271 -0.457433424 0.337572750 -0.270163556 1.448461291
#> 67 68 69 70 71 72
#> -0.573326510 -0.575038157 -0.140272011 -0.315410011 -0.961172312 0.824721214
#> 73 74 75 76 77 78
#> -0.901354359 0.169168683 -0.896163908 0.007231896 -0.373415560 -0.594719588
#> 79 80 81 82 83 84
#> 3.477722603 1.705834495 0.633720035 0.223933431 -0.681892404 0.091688599
#> 85 86 87 88 89 90
#> -0.958849378 0.039762170 0.522030530 0.217101644 0.802217765 -0.105603480
#> 91 92 93 94 95 96
#> 1.803171430 -0.208846402 0.143621272 2.071880699 -0.252983344 -0.867613033
#> 97 98 99 100 101 102
#> 0.283132465 0.485002869 1.917809071 0.534292446 -0.448511752 -0.988009170
#> 103 104 105 106 107 108
#> -0.457433424 0.284068056 1.448580252 -0.899035909 -0.220546749 -0.550491978
#> 109 110 111 112 113 114
#> -0.982663485 0.406180879 1.797872897 -0.288416280 -0.569810187 0.478778031
#> 115 116 117 118 119 120
#> 0.973583584 -0.182735193 3.478793369 0.125514447 -0.461557326 0.284068056
#> 121 122 123 124 125 126
#> -0.219781383 -0.567487519 -0.731909347 0.268260424 0.103709290 1.051034815
#> 127 128 129 130 131 132
#> -0.533617453 -0.347144432 -0.543990374 2.814603497 1.164140590 0.842706051
#> 133 134 135 136 137 138
#> 0.249106735 -0.834456782 -0.624576521 0.010462386 -0.814546328 0.599526259
#> 139 140 141 142 143 144
#> -0.401850809 1.461940805 -0.805641237 1.112213261 -0.716537252 -0.085456843
#> 145 146 147 148 149 150
#> -0.399297699 -0.418221153 -0.603665194 1.836745175 0.416531857 1.834142453
#> 151 152 153 154 155 156
#> -0.029058567 1.367593755 0.371049239 -0.105773675 0.145649552 0.314299366
#> 157 158 159 160 161 162
#> -0.988009170 -0.804424011 0.118457256 -0.863999183 -0.863999183 -0.141894085
#> 163 164 165 166 167 168
#> -0.662175041 -0.745445485 -0.850841998 -0.892695181 -0.850841998 1.350021060
#> 169 170 171 172 173 174
#> -0.053982993 0.415069434 1.226499776 0.578354360 -0.484913825 -0.156496633
#> 175 176 177 178 179 180
#> -0.845088602 -0.856526303 0.416175090 -0.498417419 -0.894432761 0.447552150
#> 181 182 183 184 185 186
#> -0.708449945 0.924596491 -0.673141711 -0.838287697 -0.556214908 5.619981155
#> 187 188 189 190 191 192
#> -0.181525854 4.362838124 -0.966572998 -0.040176066 -0.543129290 -0.205749648
#> 193 194 195 196 197 198
#> -0.194320462 -0.568344510 -0.600213823 -0.284751357 1.480014622 -0.998678736
#> 199 200 201 202 203 204
#> -0.837629582 -0.518627311 -0.883019719 2.261028528 -0.657730544 -0.858405535
#> 205 206 207 208 209 210
#> -0.873664434 -0.884831086 -0.589139061 -0.861172301 -0.699577842 -0.885678693
#> 211 212 213 214 215 216
#> -0.282819496 -0.840240392 -0.633822538 -0.858405535 0.447552150 0.134817473
#> 217 218 219 220 221 222
#> -0.632777785 -0.995617848 -0.831130404 0.355062635 -0.878212503 0.251830995
#> 223 224 225 226 227 228
#> -0.923862582 -0.271935502 0.119566688 1.542240775 -0.878590692 -0.835343878
#> 229 230 231 232 233 234
#> -0.854639237 -0.966541097 -0.694023155 0.665688975 -0.561423993 -0.845088602
#> 235 236 237 238 239 240
#> -0.726872545 -0.817902966 -0.438044823 -0.443049810 -0.249048441 -0.194320462
#> 241 242 243 244 245 246
#> -0.589481922 -0.503820939 0.954781897 1.712086304 2.211051655 -0.866075084
#> 247 248 249 250 251 252
#> 1.165049227 -0.386516970 -0.836079063 -0.571724528 -0.908106611 0.431468424
#> 253 254 255 256 257 258
#> -1.020299575 3.757261123 -0.659082941 -0.315251937 -0.350456134 -0.869525627
#> 259 260 261 262 263 264
#> -0.479126634 5.620377026 -0.754380008 3.231210951 -0.700846529 -0.315410011
#> 265 266 267 268 269 270
#> 0.999468649 -0.913968468 1.247218676 0.327402017 -0.708449945 -0.132440859
#> 271 272 273 274 275 276
#> 0.042455900 -0.883019719 0.258592438 -0.848932031 -0.482025612 0.604042835
#> 277 278 279 280 281 282
#> -0.449535798 -0.867690924 -0.848932031 -0.428161332 1.474194238 0.116475518
#> 283 284 285 286 287 288
#> -0.875889988 -0.540349046 -0.084080675 -0.630352292 -0.537781101 -0.116742651
#> 289 290 291 292 293 294
#> 0.954781897 -0.878553344 1.878017020 -0.984954760 -0.655495885 -1.007155000
#> 295 296 297 298 299 300
#> 0.595395950 2.147240733 0.130698578 -0.913135455 -0.883019719 -0.518627311
#> 301 302 303 304 305 306
#> 0.292494917 -0.797522503 -0.210368592 -0.416973592 -0.122910099 -0.484277407
#> 307 308 309 310 311 312
#> 0.244837619 1.213132625 -0.623311678 -0.848895158 0.128849749 -0.997147685
#> 313 314
#> -0.864886284 -0.214601114
#>
hatvalues(M.attendance)
#> 1 2 3 4 5 6
#> 0.011522826 0.010632762 0.012781979 0.014026782 0.020060944 0.013743374
#> 7 8 9 10 11 12
#> 0.011673461 0.018385262 0.009677632 0.012421446 0.016174717 0.011662762
#> 13 14 15 16 17 18
#> 0.014363244 0.033768516 0.023438692 0.020310794 0.010023061 0.009918403
#> 19 20 21 22 23 24
#> 0.034193693 0.017916764 0.012503109 0.011113567 0.009296424 0.011522826
#> 25 26 27 28 29 30
#> 0.013073723 0.029299980 0.017018889 0.012503109 0.013265513 0.034898031
#> 31 32 33 34 35 36
#> 0.019361679 0.010728634 0.009318289 0.009351265 0.012718944 0.012781979
#> 37 38 39 40 41 42
#> 0.015378083 0.018141281 0.042465748 0.009918403 0.010268663 0.010023061
#> 43 44 45 46 47 48
#> 0.009574398 0.010303700 0.012158819 0.011096973 0.014473169 0.009395411
#> 49 50 51 52 53 54
#> 0.011904732 0.017240080 0.013297412 0.010744452 0.009450192 0.010278486
#> 55 56 57 58 59 60
#> 0.019035246 0.010415896 0.040116866 0.041261490 0.011983755 0.009918403
#> 61 62 63 64 65 66
#> 0.009785415 0.011096973 0.014281252 0.009351983 0.010563026 0.009897634
#> 67 68 69 70 71 72
#> 0.031516124 0.014727607 0.016174717 0.009632303 0.013850385 0.016193251
#> 73 74 75 76 77 78
#> 0.021160080 0.011214950 0.012184512 0.036508078 0.009684665 0.012460155
#> 79 80 81 82 83 84
#> 0.019361679 0.012503109 0.010139793 0.015830800 0.036497012 0.010744452
#> 85 86 87 88 89 90
#> 0.014798638 0.032715111 0.009691064 0.015097828 0.014151025 0.010632762
#> 91 92 93 94 95 96
#> 0.011096973 0.013448622 0.023707878 0.031582974 0.016288486 0.013940823
#> 97 98 99 100 101 102
#> 0.012158819 0.014999825 0.009285618 0.018866885 0.032109019 0.009450767
#> 103 104 105 106 107 108
#> 0.014281252 0.018385262 0.032060750 0.011096973 0.043390950 0.011260416
#> 109 110 111 112 113 114
#> 0.009296989 0.009595343 0.015830800 0.019541137 0.011904732 0.010814958
#> 115 116 117 118 119 120
#> 0.009296989 0.009584873 0.009918403 0.039102171 0.019803602 0.018385262
#> 121 122 123 124 125 126
#> 0.017018889 0.039032834 0.014281252 0.018141281 0.020770706 0.013743374
#> 127 128 129 130 131 132
#> 0.035577295 0.009541069 0.011673461 0.010023061 0.009524195 0.010728634
#> 133 134 135 136 137 138
#> 0.019541137 0.009595343 0.030218334 0.011662762 0.017240080 0.014363244
#> 139 140 141 142 143 144
#> 0.012987415 0.031233625 0.015097828 0.015368185 0.039667426 0.010744452
#> 145 146 147 148 149 150
#> 0.010728634 0.010562515 0.009511054 0.010038287 0.011983755 0.030710985
#> 151 152 153 154 155 156
#> 0.009318289 0.009515372 0.029043900 0.030408634 0.033143135 0.038510493
#> 157 158 159 160 161 162
#> 0.009450767 0.009882073 0.016174717 0.011939315 0.011939315 0.011904634
#> 163 164 165 166 167 168
#> 0.016769719 0.009541069 0.012383791 0.012055711 0.012383791 0.012434894
#> 169 170 171 172 173 174
#> 0.013045219 0.013448622 0.014999321 0.011904634 0.011999583 0.010906595
#> 175 176 177 178 179 180
#> 0.013045219 0.011999583 0.012718209 0.025288351 0.012101869 0.013211355
#> 181 182 183 184 185 186
#> 0.010562515 0.028461204 0.018443160 0.014151025 0.012718209 0.013634171
#> 187 188 189 190 191 192
#> 0.028588755 0.012948486 0.011971825 0.028537888 0.013010582 0.013506390
#> 193 194 195 196 197 198
#> 0.019976533 0.014026782 0.025926912 0.031861247 0.012747763 0.010562515
#> 199 200 201 202 203 204
#> 0.012625689 0.014999321 0.012434894 0.019576776 0.016174717 0.011935192
#> 205 206 207 208 209 210
#> 0.009511054 0.014883824 0.033768516 0.016699590 0.028731545 0.012227377
#> 211 212 213 214 215 216
#> 0.012045614 0.013799394 0.029959091 0.011935192 0.013211355 0.012747763
#> 217 218 219 220 221 222
#> 0.024426372 0.011260416 0.013743374 0.012131868 0.009541069 0.013297412
#> 223 224 225 226 227 228
#> 0.019187985 0.010415896 0.009842340 0.014473169 0.013473768 0.014730565
#> 229 230 231 232 233 234
#> 0.012096107 0.025926912 0.011673461 0.012131868 0.012520978 0.013045219
#> 235 236 237 238 239 240
#> 0.030817136 0.016462083 0.019976533 0.036839184 0.010462363 0.019976533
#> 241 242 243 244 245 246
#> 0.017078742 0.015023251 0.012071143 0.013829159 0.009897634 0.013612897
#> 247 248 249 250 251 252
#> 0.012184512 0.010268663 0.009684665 0.012227377 0.013819929 0.013473768
#> 253 254 255 256 257 258
#> 0.010728634 0.013155728 0.015723006 0.012304054 0.013310029 0.012248539
#> 259 260 261 262 263 264
#> 0.012096107 0.012421446 0.009745113 0.011999583 0.028967609 0.009632303
#> 265 266 267 268 269 270
#> 0.044087543 0.015360646 0.014730565 0.012794686 0.010562515 0.011903398
#> 271 272 273 274 275 276
#> 0.032910962 0.012434894 0.018127940 0.012574066 0.012043854 0.010415896
#> 277 278 279 280 281 282
#> 0.013045219 0.012110838 0.012574066 0.014151025 0.017733741 0.013211355
#> 283 284 285 286 287 288
#> 0.013010582 0.013506390 0.029125634 0.013470124 0.012747763 0.009918403
#> 289 290 291 292 293 294
#> 0.012071143 0.012948486 0.014381797 0.009296424 0.015892956 0.014634232
#> 295 296 297 298 299 300
#> 0.011903398 0.025926912 0.031307972 0.015110002 0.012434894 0.014999321
#> 301 302 303 304 305 306
#> 0.012300176 0.010415896 0.013010582 0.017741649 0.011935192 0.017149517
#> 307 308 309 310 311 312
#> 0.011935192 0.012055711 0.013019187 0.010814958 0.013506390 0.010889960
#> 313 314
#> 0.015684206 0.013211355
rstandard(M.attendance, type = "pearson")
#> 1 2 3 4 5 6
#> -0.245095072 -0.404441404 -0.796185715 -0.688738736 -0.728371251 1.058332505
#> 7 8 9 10 11 12
#> 0.660136220 -0.106366871 0.720887074 2.217492293 0.119427042 -0.279727578
#> 13 14 15 16 17 18
#> -0.194866562 -0.372285160 -0.635604637 -0.957705095 -0.893191011 -1.020701133
#> 19 20 21 22 23 24
#> -0.340934257 2.138903095 -0.793954936 -0.975082209 -0.828484364 -0.973738058
#> 25 26 27 28 29 30
#> -0.088834205 -0.315130501 -0.088537508 -1.033055375 -0.590146199 -0.609257433
#> 31 32 33 34 35 36
#> -1.025636524 -0.900945188 -0.509769153 -0.991126965 -0.970452800 2.295338218
#> 37 38 39 40 41 42
#> 0.071603972 0.065506254 -0.642128087 2.463746024 -0.388516892 1.288675108
#> 43 44 45 46 47 48
#> 1.504054941 0.357710381 0.284869600 -0.533521586 -0.578926874 -0.516627551
#> 49 50 51 52 53 54
#> 0.292802893 2.355918906 -0.167925805 -0.976443897 3.537406316 0.725655960
#> 55 56 57 58 59 60
#> 2.660789668 -0.801708690 1.494722357 -0.360973705 -0.668637041 -0.762593936
#> 61 62 63 64 65 66
#> -0.841825808 -0.162977070 -0.460735192 0.339162396 -0.271601833 1.455683115
#> 67 68 69 70 71 72
#> -0.582580342 -0.579319979 -0.141420391 -0.316940136 -0.967898568 0.831480881
#> 73 74 75 76 77 78
#> -0.911044786 0.170125347 -0.901673972 0.007367635 -0.375237003 -0.598459726
#> 79 80 81 82 83 84
#> 3.511886793 1.716599667 0.636957572 0.225727280 -0.694687236 0.092185176
#> 85 86 87 88 89 90
#> -0.966023940 0.040428988 0.524578580 0.218759320 0.807954828 -0.106169425
#> 91 92 93 94 95 96
#> 1.813260348 -0.210265076 0.145354632 2.105394755 -0.255069218 -0.873724629
#> 97 98 99 100 101 102
#> 0.284869600 0.488681788 1.926775585 0.539405123 -0.455890566 -0.992711248
#> 103 104 105 106 107 108
#> -0.460735192 0.286715957 1.472375255 -0.904066101 -0.225493183 -0.553617785
#> 109 110 111 112 113 114
#> -0.987263490 0.408143739 1.812275005 -0.291276256 -0.573232492 0.481388204
#> 115 116 117 118 119 120
#> 0.978141085 -0.183617286 3.496174811 0.128042784 -0.466196595 0.286715957
#> 121 122 123 124 125 126
#> -0.221675816 -0.578897988 -0.737192291 0.270727334 0.104803422 1.058332505
#> 127 128 129 130 131 132
#> -0.543370820 -0.348812442 -0.547193571 2.828815898 1.169724258 0.847263296
#> 133 134 135 136 137 138
#> 0.251576911 -0.838489275 -0.634232759 0.010523935 -0.821659861 0.603878773
#> 139 140 141 142 143 144
#> -0.404486007 1.485320790 -0.811792697 1.120859396 -0.731186129 -0.085919670
#> 145 146 147 148 149 150
#> -0.401457050 -0.420447540 -0.606556582 1.846034055 0.419050323 1.862972387
#> 151 152 153 154 155 156
#> -0.029194909 1.374147142 0.376557887 -0.107419525 0.148124897 0.320531880
#> 157 158 159 160 161 162
#> -0.992711248 -0.808428402 0.119427042 -0.869203611 -0.869203611 -0.142746300
#> 163 164 165 166 167 168
#> -0.667798108 -0.749027310 -0.856159764 -0.898125367 -0.856159764 1.358493846
#> 169 170 171 172 173 174
#> -0.054338586 0.417888961 1.235802895 0.581827953 -0.487849655 -0.157357100
#> 175 176 177 178 179 180
#> -0.850655308 -0.861711998 0.418847105 -0.504841599 -0.899894539 0.450538154
#> 181 182 183 184 185 186
#> -0.712221354 0.938041747 -0.679436346 -0.844282715 -0.559786037 5.658689316
#> 187 188 189 190 191 192
#> -0.184177649 4.391361501 -0.972411293 -0.040761906 -0.546697359 -0.207153351
#> 193 194 195 196 197 198
#> -0.196290959 -0.572372962 -0.608149313 -0.289398983 1.489539221 -1.003995169
#> 199 200 201 202 203 204
#> -0.842968011 -0.522561149 -0.888561586 2.283490699 -0.663115257 -0.863574468
#> 205 206 207 208 209 210
#> -0.877849043 -0.891490351 -0.599345468 -0.868454246 -0.709849700 -0.891143625
#> 211 212 213 214 215 216
#> -0.284538407 -0.846098495 -0.643535713 -0.863574468 0.450538154 0.135685088
#> 217 218 219 220 221 222
#> -0.640650542 -1.001271173 -0.836901224 0.357236218 -0.882432266 0.253522231
#> 223 224 225 226 227 228
#> -0.932855742 -0.273362888 0.120159475 1.553523958 -0.884570148 -0.841565240
#> 229 230 231 232 233 234
#> -0.859855512 -0.979319839 -0.698109795 0.669764118 -0.564972136 -0.850655308
#> 235 236 237 238 239 240
#> -0.738338307 -0.824719435 -0.442486795 -0.451443238 -0.250361571 -0.196290959
#> 241 242 243 244 245 246
#> -0.594581137 -0.507648636 0.960597254 1.724048878 2.222075647 -0.872030855
#> 247 248 249 250 251 252
#> 1.172212533 -0.388516892 -0.840157282 -0.575252258 -0.914447393 0.434404884
#> 253 254 255 256 257 258
#> -1.025817222 3.782222434 -0.664326235 -0.317209458 -0.352811968 -0.874900260
#> 259 260 261 262 263 264
#> -0.482050974 5.655612228 -0.758082853 3.250773779 -0.711223451 -0.316940136
#> 265 266 267 268 269 270
#> 1.022257053 -0.921069959 1.256507544 0.329516836 -0.712221354 -0.133236215
#> 271 272 273 274 275 276
#> 0.043172264 -0.888561586 0.260968668 -0.854320161 -0.484954821 0.607213449
#> 277 278 279 280 281 282
#> -0.452496947 -0.872993368 -0.854320161 -0.431223329 1.487442192 0.117252626
#> 283 284 285 286 287 288
#> -0.881644117 -0.544035514 -0.085332540 -0.634641131 -0.541241978 -0.117325944
#> 289 290 291 292 293 294
#> 0.960597254 -0.884297153 1.891669084 -0.989565209 -0.660767691 -1.014606354
#> 295 296 297 298 299 300
#> 0.598971520 2.175629629 0.132793861 -0.920113372 -0.888561586 -0.522561149
#> 301 302 303 304 305 306
#> 0.294310553 -0.801708690 -0.211750602 -0.420722449 -0.123650208 -0.488484154
#> 307 308 309 310 311 312
#> 0.246311921 1.220512003 -0.627409238 -0.853523113 0.129728812 -1.002621886
#> 313 314
#> -0.871749653 -0.216032903
cooks.distance(M.attendance)
#> 1 2 3 4 5 6
#> 1.400527e-04 3.515845e-04 1.641511e-03 1.349683e-03 2.172140e-03 3.121603e-03
#> 7 8 9 10 11 12
#> 1.029429e-03 4.238103e-05 1.015680e-03 1.236957e-02 4.689797e-05 1.846702e-04
#> 13 14 15 16 17 18
#> 1.106726e-04 9.687512e-04 1.939269e-03 3.803051e-03 1.615452e-03 2.087363e-03
#> 19 20 21 22 23 24
#> 8.230520e-04 1.669258e-02 1.596261e-03 2.137074e-03 1.288163e-03 2.210582e-03
#> 25 26 27 28 29 30
#> 2.090764e-05 5.995055e-04 2.714380e-05 2.702461e-03 9.364249e-04 2.684475e-03
#> 31 32 33 34 35 36
#> 4.153853e-03 1.760580e-03 4.888540e-04 1.854553e-03 2.426549e-03 1.364295e-02
#> 37 38 39 40 41 42
#> 1.601537e-05 1.585676e-05 3.657276e-03 1.216165e-02 3.132178e-04 3.362731e-03
#> 43 44 45 46 47 48
#> 4.373680e-03 2.664308e-04 1.997682e-04 6.388293e-04 9.844023e-04 5.062914e-04
#> 49 50 51 52 53 54
#> 2.065863e-04 1.947343e-02 7.600563e-05 2.071097e-03 2.387614e-02 1.093724e-03
#> 55 56 57 58 59 60
#> 2.747617e-02 1.353029e-03 1.867496e-02 1.121569e-03 1.084525e-03 1.165165e-03
#> 61 62 63 64 65 66
#> 1.400633e-03 5.961202e-05 6.151004e-04 2.171849e-04 1.575055e-04 4.236576e-03
#> 67 68 69 70 71 72
#> 2.208931e-03 1.003328e-03 6.576166e-05 1.953971e-04 2.631532e-03 2.275929e-03
#> 73 74 75 76 77 78
#> 3.588518e-03 6.565435e-05 2.005679e-03 4.113648e-07 2.753927e-04 9.037924e-04
#> 79 80 81 82 83 84
#> 4.870182e-02 7.461915e-03 8.312013e-04 1.639197e-04 3.656056e-03 1.845984e-05
#> 85 86 87 88 89 90
#> 2.803513e-03 1.105630e-05 5.385820e-04 1.467184e-04 1.874052e-03 2.422800e-05
#> 91 92 93 94 95 96
#> 7.379062e-03 1.205375e-04 1.026126e-04 2.891264e-02 2.154562e-04 2.158562e-03
#> 97 98 99 100 101 102
#> 1.997682e-04 7.273311e-04 6.959124e-03 1.119006e-03 1.378960e-03 1.880472e-03
#> 103 104 105 106 107 108
#> 6.151004e-04 3.079374e-04 1.436126e-02 1.834346e-03 4.612767e-04 6.981079e-04
#> 109 110 111 112 113 114
#> 1.829342e-03 3.227781e-04 1.056602e-02 3.381899e-04 7.917943e-04 5.067202e-04
#> 115 116 117 118 119 120
#> 1.795692e-03 6.525687e-05 2.448990e-02 1.334332e-04 8.782118e-04 3.079374e-04
#> 121 122 123 124 125 126
#> 1.701581e-04 2.722423e-03 1.574725e-03 2.708402e-04 4.659591e-05 3.121603e-03
#> 127 128 129 130 131 132
#> 2.178352e-03 2.344091e-04 7.073122e-04 1.620372e-02 2.631367e-03 1.557026e-03
#> 133 134 135 136 137 138
#> 2.522853e-04 1.362300e-03 2.506824e-03 2.613862e-07 2.368678e-03 1.062833e-03
#> 139 140 141 142 143 144
#> 4.305633e-04 1.422571e-02 2.020420e-03 3.921760e-03 4.416703e-03 1.603581e-05
#> 145 146 147 148 149 150
#> 3.495724e-04 3.774267e-04 7.065642e-04 6.911155e-03 4.259819e-04 2.199294e-02
#> 151 152 153 154 155 156
#> 1.603416e-06 3.628060e-03 8.482988e-04 7.237767e-05 1.504241e-04 8.230136e-04
#> 157 158 159 160 161 162
#> 1.880472e-03 1.304591e-03 4.689797e-05 1.825866e-03 1.825866e-03 4.909948e-05
#> 163 164 165 166 167 168
#> 1.521216e-03 1.080901e-03 1.838252e-03 1.968631e-03 1.838252e-03 4.647525e-03
#> 169 170 171 172 173 174
#> 7.805501e-06 4.761128e-04 4.651184e-03 8.157111e-04 5.781107e-04 5.460779e-05
#> 175 176 177 178 179 180
#> 1.912896e-03 1.803696e-03 4.519869e-04 1.322466e-03 1.984054e-03 5.435210e-04
#> 181 182 183 184 185 186
#> 1.083026e-03 5.155460e-03 1.734792e-03 2.046366e-03 8.073446e-04 8.852225e-02
#> 187 188 189 190 191 192
#> 1.996623e-04 5.059500e-02 2.291506e-03 9.761913e-06 7.879673e-04 1.175057e-04
#> 193 194 195 196 197 198
#> 1.570776e-04 9.321400e-04 1.968837e-03 5.512507e-04 5.729804e-03 2.152148e-03
#> 199 200 201 202 203 204
#> 1.817295e-03 8.316475e-04 1.988298e-03 2.082361e-02 1.445862e-03 1.801663e-03
#> 205 206 207 208 209 210
#> 1.479956e-03 2.401543e-03 2.510818e-03 2.561790e-03 2.981141e-03 1.966082e-03
#> 211 212 213 214 215 216
#> 1.974258e-04 2.003395e-03 2.558079e-03 1.801663e-03 5.435210e-04 4.754448e-05
#> 217 218 219 220 221 222
#> 2.055281e-03 2.283526e-03 1.952009e-03 3.134510e-04 1.500214e-03 1.732379e-04
#> 223 224 225 226 227 228
#> 3.404886e-03 1.573088e-04 2.870384e-05 7.088610e-03 2.137347e-03 2.117727e-03
#> 229 230 231 232 233 234
#> 1.810556e-03 5.105501e-03 1.151269e-03 1.101799e-03 8.094582e-04 1.912896e-03
#> 235 236 237 238 239 240
#> 3.466788e-03 2.276859e-03 7.982047e-04 1.559005e-03 1.325448e-04 1.570776e-04
#> 241 242 243 244 245 246
#> 1.228540e-03 7.861300e-04 2.254942e-03 8.336289e-03 9.871860e-03 2.098925e-03
#> 247 248 249 250 251 252
#> 3.389807e-03 3.132178e-04 1.380582e-03 8.192623e-04 2.343673e-03 5.154658e-04
#> 253 254 255 256 257 258
#> 2.282438e-03 3.814085e-02 1.409974e-03 2.506959e-04 3.358264e-04 1.898382e-03
#> 259 260 261 262 263 264
#> 5.690453e-04 8.046180e-02 1.131106e-03 2.566921e-02 3.018013e-03 1.953971e-04
#> 265 266 267 268 269 270
#> 9.639356e-03 2.646961e-03 4.720898e-03 2.814540e-04 1.083026e-03 4.277068e-05
#> 271 272 273 274 275 276
#> 1.268568e-05 1.988298e-03 2.514782e-04 1.858842e-03 5.734035e-04 7.761697e-04
#> 277 278 279 280 281 282
#> 5.412718e-04 1.868607e-03 1.858842e-03 5.338411e-04 7.988796e-03 3.681276e-05
#> 283 284 285 286 287 288
#> 2.049278e-03 8.104561e-04 4.368896e-05 1.099886e-03 7.565172e-04 2.757966e-05
#> 289 290 291 292 293 294
#> 2.254942e-03 2.051661e-03 1.044299e-02 1.837769e-03 1.410230e-03 3.057719e-03
#> 295 296 297 298 299 300
#> 8.643983e-04 2.519760e-02 1.139870e-04 2.597703e-03 1.988298e-03 8.316475e-04
#> 301 302 303 304 305 306
#> 2.157387e-04 1.353029e-03 1.182125e-04 6.394250e-04 3.693718e-05 8.327131e-04
#> 307 308 309 310 311 312
#> 1.465699e-04 3.635586e-03 1.038501e-03 1.592971e-03 4.608376e-05 2.213533e-03
#> 313 314
#> 2.421819e-03 1.249663e-04