library(readxl)
PredomBlack<- read_excel("~/Desktop/Spring 2025/PAD 6923/Datasets/FINALS/Predominantly Black Districts.xlsx")
PredomWhite<- read_excel("~/Desktop/Spring 2025/PAD 6923/Datasets/FINALS/Predominantly White Districts.xlsx")
Are black students in districts with low populations of black students getting disiciplined more?
hist(PredomBlack$BLKRTEISS)
hist(PredomWhite$BLKRTEISS)
Predominantly Black Districts ISS Rates
predomBlack_ISS<-lm(BLKRTEISS~CERTBLK+CERTWHITE+PCTBLK+DISTENROLL,data=PredomBlack)
summary(predomBlack_ISS)
##
## Call:
## lm(formula = BLKRTEISS ~ CERTBLK + CERTWHITE + PCTBLK + DISTENROLL,
## data = PredomBlack)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.215268 -0.100272 -0.000686 0.081599 0.272101
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.934e-01 2.515e-01 1.166 0.262
## CERTBLK 5.756e-04 1.905e-03 0.302 0.767
## CERTWHITE 1.576e-03 1.437e-03 1.097 0.290
## PCTBLK -9.611e-02 3.248e-01 -0.296 0.771
## DISTENROLL -9.066e-05 1.016e-04 -0.892 0.386
##
## Residual standard error: 0.1469 on 15 degrees of freedom
## Multiple R-squared: 0.1825, Adjusted R-squared: -0.03554
## F-statistic: 0.837 on 4 and 15 DF, p-value: 0.5227
Predominantly Black Districts OSS Rates
predomBlack_OSS<-lm(BLKRTEOSS~CERTBLK+CERTWHITE+PCTBLK+DISTENROLL,data=PredomBlack)
summary(predomBlack_OSS)
##
## Call:
## lm(formula = BLKRTEOSS ~ CERTBLK + CERTWHITE + PCTBLK + DISTENROLL,
## data = PredomBlack)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.13210 -0.03461 -0.02076 0.03820 0.12416
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.117e-01 1.194e-01 1.774 0.0964 .
## CERTBLK -8.637e-05 9.043e-04 -0.096 0.9252
## CERTWHITE -1.107e-03 6.820e-04 -1.623 0.1254
## PCTBLK -6.548e-02 1.542e-01 -0.425 0.6770
## DISTENROLL 5.418e-05 4.824e-05 1.123 0.2790
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06972 on 15 degrees of freedom
## Multiple R-squared: 0.2715, Adjusted R-squared: 0.07721
## F-statistic: 1.397 on 4 and 15 DF, p-value: 0.2822
Predominantly White Districts ISS Rates
predomwhite_ISS<-lm(BLKRTEISS~CERTBLK+CERTWHITE+PCTBLK+DISTENROLL,data=PredomWhite)
summary(predomwhite_ISS)
##
## Call:
## lm(formula = BLKRTEISS ~ CERTBLK + CERTWHITE + PCTBLK + DISTENROLL,
## data = PredomWhite)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.083589 -0.051391 0.001422 0.046350 0.101568
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.217e-01 3.787e-02 3.213 0.00581 **
## CERTBLK -1.369e-03 2.670e-03 -0.513 0.61557
## CERTWHITE 6.797e-04 6.487e-04 1.048 0.31130
## PCTBLK 4.642e-01 2.087e-01 2.224 0.04192 *
## DISTENROLL -4.118e-05 3.781e-05 -1.089 0.29322
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06463 on 15 degrees of freedom
## Multiple R-squared: 0.4643, Adjusted R-squared: 0.3214
## F-statistic: 3.25 on 4 and 15 DF, p-value: 0.04154
Predominantly White OSS Rates
predomwhite_OSS<-lm(BLKRTEOSS~CERTBLK+CERTWHITE+PCTBLK+DISTENROLL,data=PredomWhite)
summary(predomwhite_OSS)
##
## Call:
## lm(formula = BLKRTEOSS ~ CERTBLK + CERTWHITE + PCTBLK + DISTENROLL,
## data = PredomWhite)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.070215 -0.029970 -0.006762 0.013265 0.110121
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.796e-02 2.800e-02 3.499 0.00323 **
## CERTBLK -2.339e-03 1.974e-03 -1.185 0.25461
## CERTWHITE -5.042e-04 4.796e-04 -1.051 0.30977
## PCTBLK 1.357e-01 1.543e-01 0.879 0.39306
## DISTENROLL 3.404e-05 2.795e-05 1.218 0.24207
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04779 on 15 degrees of freedom
## Multiple R-squared: 0.1239, Adjusted R-squared: -0.1098
## F-statistic: 0.5301 on 4 and 15 DF, p-value: 0.7155
plot(predomwhite_ISS,which=1)
plot(predomwhite_ISS,which=2)
plot(predomwhite_ISS,which=3)
plot(predomwhite_ISS,which=5)
ISS Logs
predomwhite_ISS_log<-lm(sqrt(BLKRTEISS)~sqrt(CERTBLK)+sqrt(CERTWHITE)+sqrt(PCTBLK)+sqrt(DISTENROLL),data=PredomWhite)
plot(predomwhite_ISS_log,which=1)
plot(predomwhite_ISS_log,which=2)
plot(predomwhite_ISS_log,which=3)
plot(predomwhite_ISS_log,which=5)
summary(predomwhite_ISS_log)
##
## Call:
## lm(formula = sqrt(BLKRTEISS) ~ sqrt(CERTBLK) + sqrt(CERTWHITE) +
## sqrt(PCTBLK) + sqrt(DISTENROLL), data = PredomWhite)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08464 -0.05105 -0.01803 0.05063 0.09445
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.223718 0.081158 2.757 0.0147 *
## sqrt(CERTBLK) -0.024900 0.023395 -1.064 0.3040
## sqrt(CERTWHITE) 0.027361 0.017696 1.546 0.1429
## sqrt(PCTBLK) 0.537074 0.211323 2.541 0.0226 *
## sqrt(DISTENROLL) -0.005893 0.004014 -1.468 0.1627
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06681 on 15 degrees of freedom
## Multiple R-squared: 0.5939, Adjusted R-squared: 0.4856
## F-statistic: 5.484 on 4 and 15 DF, p-value: 0.00633
predomblack_ISS_log<-lm(sqrt(BLKRTEISS)~sqrt(CERTBLK)+sqrt(CERTWHITE)+sqrt(PCTBLK)+sqrt(DISTENROLL),data=PredomBlack)
plot(predomblack_ISS_log,which=1)
plot(predomblack_ISS_log,which=2)
plot(predomblack_ISS_log,which=3)
plot(predomblack_ISS_log,which=5)
summary(predomblack_ISS_log)
##
## Call:
## lm(formula = sqrt(BLKRTEISS) ~ sqrt(CERTBLK) + sqrt(CERTWHITE) +
## sqrt(PCTBLK) + sqrt(DISTENROLL), data = PredomBlack)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.37817 -0.06475 0.01788 0.07901 0.28472
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.131901 0.738761 0.179 0.861
## sqrt(CERTBLK) -0.039905 0.044414 -0.898 0.383
## sqrt(CERTWHITE) 0.019423 0.028817 0.674 0.511
## sqrt(PCTBLK) 0.358686 0.834050 0.430 0.673
## sqrt(DISTENROLL) 0.002048 0.010616 0.193 0.850
##
## Residual standard error: 0.1849 on 15 degrees of freedom
## Multiple R-squared: 0.2192, Adjusted R-squared: 0.01093
## F-statistic: 1.053 on 4 and 15 DF, p-value: 0.4135
OSS Logs
predomwhite_OSS_log<-lm(sqrt(BLKRTEOSS)~sqrt(CERTBLK)+sqrt(CERTWHITE)+sqrt(PCTBLK)+sqrt(DISTENROLL),data=PredomWhite)
plot(predomwhite_OSS_log,which=1)
plot(predomwhite_OSS_log,which=2)
plot(predomwhite_OSS_log,which=3)
plot(predomwhite_OSS_log,which=5)
summary(predomwhite_OSS_log)
##
## Call:
## lm(formula = sqrt(BLKRTEOSS) ~ sqrt(CERTBLK) + sqrt(CERTWHITE) +
## sqrt(PCTBLK) + sqrt(DISTENROLL), data = PredomWhite)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.133483 -0.046093 -0.001968 0.037286 0.149243
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.313853 0.095582 3.284 0.00503 **
## sqrt(CERTBLK) -0.005071 0.027553 -0.184 0.85643
## sqrt(CERTWHITE) -0.011316 0.020841 -0.543 0.59513
## sqrt(PCTBLK) 0.025304 0.248880 0.102 0.92036
## sqrt(DISTENROLL) 0.002966 0.004727 0.627 0.53985
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07868 on 15 degrees of freedom
## Multiple R-squared: 0.04416, Adjusted R-squared: -0.2107
## F-statistic: 0.1733 on 4 and 15 DF, p-value: 0.9487
predomblack_OSS_log<-lm(sqrt(BLKRTEOSS)~sqrt(CERTBLK)+sqrt(CERTWHITE)+sqrt(PCTBLK)+sqrt(DISTENROLL),data=PredomBlack)
plot(predomblack_OSS_log,which=1)
plot(predomblack_OSS_log,which=2)
plot(predomblack_OSS_log,which=3)
plot(predomblack_OSS_log,which=5)
summary(predomblack_OSS_log)
##
## Call:
## lm(formula = sqrt(BLKRTEOSS) ~ sqrt(CERTBLK) + sqrt(CERTWHITE) +
## sqrt(PCTBLK) + sqrt(DISTENROLL), data = PredomBlack)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.237750 -0.041013 0.002812 0.056941 0.154407
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.236170 0.378497 0.624 0.542
## sqrt(CERTBLK) -0.007950 0.022755 -0.349 0.732
## sqrt(CERTWHITE) -0.014204 0.014764 -0.962 0.351
## sqrt(PCTBLK) 0.135412 0.427318 0.317 0.756
## sqrt(DISTENROLL) 0.005195 0.005439 0.955 0.355
##
## Residual standard error: 0.09473 on 15 degrees of freedom
## Multiple R-squared: 0.2034, Adjusted R-squared: -0.009002
## F-statistic: 0.9576 on 4 and 15 DF, p-value: 0.4588
Descriptive Stats
summary(PredomWhite)
## School Dist. DISTENROLL PCTBLK NUMBLK
## Length:20 Min. : 412 Min. :0.01400 Min. : 11.00
## Class :character 1st Qu.: 1018 1st Qu.:0.03625 1st Qu.: 43.25
## Mode :character Median : 1842 Median :0.09800 Median : 260.50
## Mean : 3268 Mean :0.13740 Mean : 465.40
## 3rd Qu.: 4608 3rd Qu.:0.20375 3rd Qu.: 544.00
## Max. :10334 Max. :0.38200 Max. :2829.00
## NUMBLKOSS NUMBLKISS PCTWHITE NUMWHITE
## Min. : 0.900 Min. : 1.100 Min. :0.5020 Min. : 355.0
## 1st Qu.: 5.433 1st Qu.: 4.995 1st Qu.:0.6212 1st Qu.: 835.2
## Median : 22.120 Median : 45.630 Median :0.7185 Median :1029.5
## Mean : 44.852 Mean : 86.164 Mean :0.7170 Mean :2214.6
## 3rd Qu.: 49.885 3rd Qu.:102.498 3rd Qu.:0.7937 3rd Qu.:3276.8
## Max. :198.030 Max. :509.220 Max. :0.9590 Max. :6981.0
## NUMWHTOSS NUMWHTISS BLKRTEISS WHTRTEISS
## Min. : 4.15 Min. : 12.45 Min. :0.0600 Min. :0.0300
## 1st Qu.: 19.73 1st Qu.: 90.55 1st Qu.:0.1475 1st Qu.:0.0575
## Median : 45.31 Median :123.66 Median :0.1850 Median :0.0850
## Mean : 70.76 Mean :164.83 Mean :0.1875 Mean :0.0965
## 3rd Qu.:105.73 3rd Qu.:231.62 3rd Qu.:0.2100 3rd Qu.:0.1225
## Max. :180.45 Max. :388.99 Max. :0.3800 Max. :0.2600
## BLKRTEOSS WHTRTEOSS DISPRTEISS DISPRTEOSS
## Min. :0.0300 Min. :0.010 Min. :0.600 Min. : 1.000
## 1st Qu.:0.0700 1st Qu.:0.020 1st Qu.:1.730 1st Qu.: 1.938
## Median :0.0900 Median :0.030 Median :2.230 Median : 2.585
## Mean :0.0995 Mean :0.036 Mean :2.220 Mean : 3.753
## 3rd Qu.:0.1325 3rd Qu.:0.040 3rd Qu.:2.812 3rd Qu.: 3.542
## Max. :0.2000 Max. :0.110 Max. :4.000 Max. :20.000
## URBAN RURAL CERTBLK CERTWHITE
## Min. :0.00 Min. :0.00 Min. : 0.00 Min. : 43.0
## 1st Qu.:0.00 1st Qu.:0.00 1st Qu.: 1.00 1st Qu.:109.2
## Median :1.00 Median :0.00 Median : 3.00 Median :135.0
## Mean :0.55 Mean :0.45 Mean : 8.05 Mean :217.2
## 3rd Qu.:1.00 3rd Qu.:1.00 3rd Qu.:12.00 3rd Qu.:274.2
## Max. :1.00 Max. :1.00 Max. :50.00 Max. :614.0
summary(PredomBlack)
## School Dist. DISTENROLL PCTBLK NUMBLK
## Length:20 Min. : 343 Min. :0.3620 Min. : 232
## Class :character 1st Qu.: 709 1st Qu.:0.5323 1st Qu.: 505
## Mode :character Median : 2103 Median :0.6900 Median : 1347
## Mean : 3071 Mean :0.7019 Mean : 1963
## 3rd Qu.: 3638 3rd Qu.:0.8685 3rd Qu.: 2050
## Max. :21595 Max. :0.9720 Max. :13259
## NUMBLKOSS NUMBLKISS PCTWHITE NUMWHITE
## Min. : 10.50 Min. : 0.00 Min. :0.0160 Min. : 9.0
## 1st Qu.: 58.81 1st Qu.: 74.53 1st Qu.:0.0900 1st Qu.: 109.0
## Median : 144.88 Median : 257.43 Median :0.2015 Median : 218.0
## Mean : 360.14 Mean : 384.98 Mean :0.2089 Mean : 703.9
## 3rd Qu.: 377.63 3rd Qu.: 596.38 3rd Qu.:0.3448 3rd Qu.:1151.0
## Max. :2519.27 Max. :1856.31 Max. :0.3790 Max. :4103.0
## NUMWHTOSS NUMWHTISS BLKRTEISS WHTRTEISS
## Min. : 0.000 Min. : 0.00 Min. :0.0000 Min. :0.0000
## 1st Qu.: 7.795 1st Qu.: 4.13 1st Qu.:0.1325 1st Qu.:0.0550
## Median : 19.290 Median : 20.43 Median :0.2700 Median :0.1000
## Mean : 37.002 Mean : 60.20 Mean :0.2350 Mean :0.1070
## 3rd Qu.: 45.938 3rd Qu.:115.52 3rd Qu.:0.3125 3rd Qu.:0.1275
## Max. :164.120 Max. :221.41 Max. :0.5400 Max. :0.4300
## BLKRTEOSS WHTRTEOSS DISPRTEISS DISPRTEOSS URBAN
## Min. :0.020 Min. :0.0000 Min. :0.000 Min. :0.000 Min. :0.0
## 1st Qu.:0.110 1st Qu.:0.0300 1st Qu.:1.450 1st Qu.:1.200 1st Qu.:1.0
## Median :0.145 Median :0.0650 Median :2.110 Median :2.450 Median :1.0
## Mean :0.154 Mean :0.0835 Mean :2.054 Mean :2.542 Mean :0.9
## 3rd Qu.:0.190 3rd Qu.:0.1025 3rd Qu.:2.908 3rd Qu.:3.542 3rd Qu.:1.0
## Max. :0.370 Max. :0.3800 Max. :4.400 Max. :5.670 Max. :1.0
## RURAL CERTBLK CERTWHITE
## Min. :0.0 Min. : 5.0 Min. : 20.00
## 1st Qu.:0.0 1st Qu.: 30.0 1st Qu.: 54.75
## Median :0.0 Median : 41.5 Median : 84.50
## Mean :0.1 Mean : 74.9 Mean :155.10
## 3rd Qu.:0.0 3rd Qu.: 55.0 3rd Qu.:199.50
## Max. :1.0 Max. :589.0 Max. :973.00