suppressPackageStartupMessages(library(tidyverse))
library(haven)
state_wide_all <- read_dta("2017_state_wide_all.dta")
head(state_wide_all)
state_wide_elem <- read_dta("state_wide_elem.dta")
head(state_wide_elem)
state_wide_sec <- read_dta("state_wide_sec.dta")
head(state_wide_sec)
rr_all <- matrix(c(state_wide_all$count__0_0_, state_wide_all$count__1_0_, state_wide_all$count__0_1_, state_wide_all$count__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_all) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_all)
$data
SPED Status
DLL Status No Yes Total
No 963084 136241 1099325
Yes 136952 21400 158352
Total 1100036 157641 1257677
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.090457 1.075927 1.105183
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 9.702698e-36 2.211424e-36
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_all[1,2]/(rr_all[1,1]+rr_all[1,2])
[1] 0.1239315
rr_sec <- matrix(c(state_wide_sec$count__0_0_, state_wide_sec$count__1_0_, state_wide_sec$count__0_1_, state_wide_sec$count__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_sec) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_sec)
$data
SPED Status
DLL Status No Yes Total
No 534716 79084 613800
Yes 57306 11255 68561
Total 592022 90339 682361
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.274109 1.251256 1.29738
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 7.252984e-140 1.165395e-147
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_sec[1,2]/(rr_sec[1,1]+rr_sec[1,2])
[1] 0.1288433
rr_elem <- matrix(c(state_wide_elem$count__0_0_, state_wide_elem$count__1_0_, state_wide_elem$count__0_1_, state_wide_elem$count__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_elem) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_elem)
$data
SPED Status
DLL Status No Yes Total
No 428368 57157 485525
Yes 79646 10145 89791
Total 508014 67302 575316
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.9597573 0.9408668 0.9790271
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 4.638384e-05 4.719157e-05 4.958048e-05
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_elem[1,2]/(rr_elem[1,1]+rr_elem[1,2])
[1] 0.1177221
rr_female <- matrix(c(state_wide_all$count_0_0_0_, state_wide_all$count_0_1_0_, state_wide_all$count_0_0_1_, state_wide_all$count_0_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female) <- list("Female DLL Status" = dll, "Female SPED Status" = outc)
epitools::riskratio(rr_female)
$data
Female SPED Status
Female DLL Status No Yes Total
No 469278 91299 560577
Yes 71164 14362 85526
Total 540442 105661 646103
$measure
risk ratio with 95% C.I.
Female DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.031065 1.014643 1.047753
$p.value
two-sided
Female DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0.000202463 0.0002014787 0.0001942515
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female[1,2]/(rr_female[1,1]+rr_female[1,2])
[1] 0.1628661
rr_male <- matrix(c(state_wide_all$count_1_0_0_, state_wide_all$count_1_1_0_, state_wide_all$count_1_0_1_, state_wide_all$count_1_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male) <- list("Male DLL Status" = dll, "Male SPED Status" = outc)
epitools::riskratio(rr_male)
$data
Male SPED Status
Male DLL Status No Yes Total
No 493806 44942 538748
Yes 65788 7038 72826
Total 559594 51980 611574
$measure
risk ratio with 95% C.I.
Male DLL Status estimate lower upper
No 1.0000 NA NA
Yes 1.1585 1.131135 1.186527
$p.value
two-sided
Male DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 3.656369e-32 3.191689e-33
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male[1,2]/(rr_male[1,1]+rr_male[1,2])
[1] 0.08341934
rr_loses <- matrix(c(state_wide_all$count__0_0_1, state_wide_all$count__1_0_1, state_wide_all$count__0_1_1, state_wide_all$count__1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_loses) <- list("Low SES DLL Status" = dll, "Low SES SPED Status" = outc)
epitools::riskratio(rr_loses)
$data
Low SES SPED Status
Low SES DLL Status No Yes Total
No 335466 67595 403061
Yes 95326 15263 110589
Total 430792 82858 513650
$measure
risk ratio with 95% C.I.
Low SES DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.8229703 0.8097005 0.8364576
$p.value
two-sided
Low SES DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 1.022524e-128 5.726996e-125
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_loses[1,2]/(rr_loses[1,1]+rr_loses[1,2])
[1] 0.1677041
rr_hises <- matrix(c(state_wide_all$count__0_0_0, state_wide_all$count__1_0_0, state_wide_all$count__0_1_0, state_wide_all$count__1_1_0),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_hises) <- list("High SES DLL Status" = dll, "High SES SPED Status" = outc)
epitools::riskratio(rr_hises)
$data
High SES SPED Status
High SES DLL Status No Yes Total
No 627618 68646 696264
Yes 41626 6137 47763
Total 669244 74783 744027
$measure
risk ratio with 95% C.I.
High SES DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.303236 1.271807 1.335443
$p.value
two-sided
High SES DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 1.213702e-91 4.202525e-98
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_hises[1,2]/(rr_hises[1,1]+rr_hises[1,2])
[1] 0.09859191
rr_asian <- matrix(c(state_wide_all$count2__0_0_, state_wide_all$count2__1_0_, state_wide_all$count2__0_1_, state_wide_all$count2__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_asian) <- list("Asian DLL Status" = dll, "Asian SPED Status" = outc)
epitools::riskratio(rr_asian)
$data
Asian SPED Status
Asian DLL Status No Yes Total
No 59189 2684 61873
Yes 23974 2954 26928
Total 83163 5638 88801
$measure
risk ratio with 95% C.I.
Asian DLL Status estimate lower upper
No 1.000000 NA NA
Yes 2.528862 2.404882 2.659233
$p.value
two-sided
Asian DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 3.57862e-279 8.825298e-304
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_asian[1,2]/(rr_asian[1,1]+rr_asian[1,2])
[1] 0.04337918
rr_black <- matrix(c(state_wide_all$count3__0_0_, state_wide_all$count3__1_0_, state_wide_all$count3__0_1_, state_wide_all$count3__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_black) <- list("Black DLL Status" = dll, "Black SPED Status" = outc)
epitools::riskratio(rr_black)
$data
Black SPED Status
Black DLL Status No Yes Total
No 225333 41604 266937
Yes 9306 1382 10688
Total 234639 42986 277625
$measure
risk ratio with 95% C.I.
Black DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.8296316 0.7891845 0.8721517
$p.value
two-sided
Black DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 2.720046e-14 2.965385e-14 9.989572e-14
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_black[1,2]/(rr_black[1,1]+rr_black[1,2])
[1] 0.155857
rr_latinx <- matrix(c(state_wide_all$count4__0_0_, state_wide_all$count4__1_0_, state_wide_all$count4__0_1_, state_wide_all$count4__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_latinx) <- list("Latinx DLL Status" = dll, "Latinx SPED Status" = outc)
epitools::riskratio(rr_latinx)
$data
Latinx SPED Status
Latinx DLL Status No Yes Total
No 84999 9367 94366
Yes 87584 14815 102399
Total 172583 24182 196765
$measure
risk ratio with 95% C.I.
Latinx DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.457542 1.42253 1.493415
$p.value
two-sided
Latinx DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 2.933738e-208 2.273166e-206
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_latinx[1,2]/(rr_latinx[1,1]+rr_latinx[1,2])
[1] 0.09926245
rr_white <- matrix(c(state_wide_all$count5__0_0_, state_wide_all$count5__1_0_, state_wide_all$count5__0_1_, state_wide_all$count5__1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_white) <- list("White DLL Status" = dll, "White SPED Status" = outc)
epitools::riskratio(rr_white)
$data
White SPED Status
White DLL Status No Yes Total
No 529497 73963 603460
Yes 14083 1896 15979
Total 543580 75859 619439
$measure
risk ratio with 95% C.I.
White DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.9681055 0.9275512 1.010433
$p.value
two-sided
White DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0.1358838 0.1390848 0.1368039
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_white[1,2]/(rr_white[1,1]+rr_white[1,2])
[1] 0.1225649
Pattern for Count variable: race_gender_disability_dll_econ_disad
1=American Indian/Alaska Native 2=Asian 3=Black or African/American 4=Hispanic of any race 5=White
#Within Race/ethnicity and gender (K-12)
##(Asian DLL males)
rr_male_asian <- matrix(c(state_wide_all$count2_0_0_0_, state_wide_all$count2_0_1_0_, state_wide_all$count2_0_0_1_, state_wide_all$count2_0_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_asian) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_asian)
$data
SPED Status
DLL Status No Yes Total
No 28437 1829 30266
Yes 12868 2081 14949
Total 41305 3910 45215
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 2.303569 2.170102 2.445245
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 1.074473e-162 5.792174e-173
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_asian[1,2]/(rr_male_asian[1,1]+rr_male_asian[1,2])
[1] 0.06043085
rr_male_latinx <- matrix(c(state_wide_all$count4_0_0_0_, state_wide_all$count4_0_1_0_, state_wide_all$count4_0_0_1_, state_wide_all$count4_0_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_latinx) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_latinx)
$data
SPED Status
DLL Status No Yes Total
No 40702 6230 46932
Yes 44895 9782 54677
Total 85597 16012 101609
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.347733 1.308846 1.387776
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 6.486957e-91 3.765577e-90
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_latinx[1,2]/(rr_male_latinx[1,1]+rr_male_latinx[1,2])
[1] 0.1327452
rr_male_black <- matrix(c(state_wide_all$count3_0_0_0_, state_wide_all$count3_0_1_0_, state_wide_all$count3_0_0_1_, state_wide_all$count3_0_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_black) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_black)
$data
SPED Status
DLL Status No Yes Total
No 107845 27822 135667
Yes 4862 968 5830
Total 112707 28790 141497
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.8096413 0.7636554 0.8583965
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 1.173506e-13 1.360476e-13 4.169015e-13
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_black[1,2]/(rr_male_black[1,1]+rr_male_black[1,2])
[1] 0.2050757
#(Asian DLL females)
rr_female_asian <- matrix(c(state_wide_all$count2_1_0_0_, state_wide_all$count2_1_1_0_, state_wide_all$count2_1_0_1_, state_wide_all$count2_1_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_asian) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_asian)
$data
SPED Status
DLL Status No Yes Total
No 30752 855 31607
Yes 11106 873 11979
Total 41858 1728 43586
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 2.694082 2.45746 2.953488
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 5.139311e-95 3.286059e-106
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_asian[1,2]/(rr_female_asian[1,1]+rr_female_asian[1,2])
[1] 0.02705097
#(Latinx)
rr_female_latinx <- matrix(c(state_wide_all$count4_1_0_0_, state_wide_all$count4_1_1_0_, state_wide_all$count4_1_0_1_, state_wide_all$count4_1_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_latinx) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_latinx)
$data
SPED Status
DLL Status No Yes Total
No 44297 3137 47434
Yes 42689 5033 47722
Total 86986 8170 95156
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.594717 1.528001 1.664345
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 8.988519e-105 5.674375e-104
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_latinx[1,2]/(rr_female_latinx[1,1]+rr_female_latinx[1,2])
[1] 0.066134
#(Black)
rr_female_black <- matrix(c(state_wide_all$count3_1_0_0_, state_wide_all$count3_1_1_0_, state_wide_all$count3_1_0_1_, state_wide_all$count3_1_1_1_),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_black) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_black)
$data
SPED Status
DLL Status No Yes Total
No 117488 13782 131270
Yes 4444 414 4858
Total 121932 14196 136128
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 0.811701 0.7392653 0.8912341
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 5.500466e-06 6.154231e-06 9.542334e-06
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_black[1,2]/(rr_female_black[1,1]+rr_female_black[1,2])
[1] 0.1049897
#(Asian DLL Low SES males)
rr_male_loses_asian <- matrix(c(state_wide_all$count2_0_0_0_1, state_wide_all$count2_0_1_0_1, state_wide_all$count2_0_0_1_1, state_wide_all$count2_0_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_loses_asian) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_loses_asian)
$data
SPED Status
DLL Status No Yes Total
No 4545 413 4958
Yes 5640 811 6451
Total 10185 1224 11409
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.509212 1.348559 1.689004
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 2.2915e-13 2.598932e-13 3.955507e-13
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_loses_asian[1,2]/(rr_male_loses_asian[1,1]+rr_male_loses_asian[1,2])
[1] 0.08329972
#(Latinx)
rr_male_loses_latinx <- matrix(c(state_wide_all$count4_0_0_0_1, state_wide_all$count4_0_1_0_1, state_wide_all$count4_0_0_1_1, state_wide_all$count4_0_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_loses_latinx) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_loses_latinx)
$data
SPED Status
DLL Status No Yes Total
No 19788 3124 22912
Yes 35501 7963 43464
Total 55289 11087 66376
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.00000 NA NA
Yes 1.34369 1.293383 1.395953
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 9.228997e-55 1.961782e-53
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_loses_latinx[1,2]/(rr_male_loses_latinx[1,1]+rr_male_loses_latinx[1,2])
[1] 0.1363478
#(Black)
rr_male_loses_black <- matrix(c(state_wide_all$count3_0_0_0_1, state_wide_all$count3_0_1_0_1, state_wide_all$count3_0_0_1_1, state_wide_all$count3_0_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_male_loses_black) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_male_loses_black)
$data
SPED Status
DLL Status No Yes Total
No 65212 19388 84600
Yes 3497 672 4169
Total 68709 20060 88769
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.7033552 0.655581 0.754611
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 2.604473e-26 1.232078e-24
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_male_loses_black[1,2]/(rr_male_loses_black[1,1]+rr_male_loses_black[1,2])
[1] 0.2291726
#(Asian Low SES females)
rr_female_loses_asian <- matrix(c(state_wide_all$count2_1_0_0_1, state_wide_all$count2_1_1_0_1, state_wide_all$count2_1_0_1_1, state_wide_all$count2_1_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_loses_asian) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_loses_asian)
$data
SPED Status
DLL Status No Yes Total
No 4843 135 4978
Yes 5144 372 5516
Total 9987 507 10494
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 2.486794 2.049974 3.016695
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 1.086479e-22 6.664128e-22
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_loses_asian[1,2]/(rr_female_loses_asian[1,1]+rr_female_loses_asian[1,2])
[1] 0.02711933
#(Latinx)
rr_female_loses_latinx <- matrix(c(state_wide_all$count4_1_0_0_1, state_wide_all$count4_1_1_0_1, state_wide_all$count4_1_0_1_1, state_wide_all$count4_1_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_loses_latinx) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_loses_latinx)
$data
SPED Status
DLL Status No Yes Total
No 22067 1600 23667
Yes 34184 4125 38309
Total 56251 5725 61976
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.000000 NA NA
Yes 1.592745 1.506901 1.68348
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 0 2.664639e-65 6.828258e-63
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_loses_latinx[1,2]/(rr_female_loses_latinx[1,1]+rr_female_loses_latinx[1,2])
[1] 0.06760468
#(Black)
rr_female_loses_black <- matrix(c(state_wide_all$count3_1_0_0_1, state_wide_all$count3_1_1_0_1, state_wide_all$count3_1_0_1_1, state_wide_all$count3_1_1_1_1),2,2,byrow=TRUE)
dll <- c("No", "Yes")
outc <- c("No", "Yes")
dimnames(rr_female_loses_black) <- list("DLL Status" = dll, "SPED Status" = outc)
epitools::riskratio(rr_female_loses_black)
$data
SPED Status
DLL Status No Yes Total
No 72458 9992 82450
Yes 3262 290 3552
Total 75720 10282 86002
$measure
risk ratio with 95% C.I.
DLL Status estimate lower upper
No 1.0000000 NA NA
Yes 0.6736949 0.602424 0.7533977
$p.value
two-sided
DLL Status midp.exact fisher.exact chi.square
No NA NA NA
Yes 8.204548e-14 1.005558e-13 1.138879e-12
$correction
[1] FALSE
attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
rr_female_loses_black[1,2]/(rr_female_loses_black[1,1]+rr_female_loses_black[1,2])
[1] 0.1211886