YF Epidemics and Race

1808: St. Mary's, Georgia


# Raw data to make contingency tables
SMcounts <- matrix(c(45, 42, 42, 3, 87, 45), ncol = 2, nrow = 2)
colnames(SMcounts) <- c("YF and survived", "YF and died")
rownames(SMcounts) <- c("Caucasians", "Non-Caucasians")
addmargins(SMcounts)
##                YF and survived YF and died Sum
## Caucasians                  45          42  87
## Non-Caucasians              42           3  45
## Sum                         87          45 132

addmargins(prop.table(SMcounts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians              0.3409     0.31818 0.6591
## Non-Caucasians          0.3182     0.02273 0.3409
## Sum                     0.6591     0.34091 1.0000
prop.table(SMcounts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians              0.5172     0.48276
## Non-Caucasians          0.9333     0.06667


# command used to create a segmented bar plot
barplot(t(prop.table(SMcounts, 1)), main = "Race and Case Fatality in the 1808 St. Mary's, GA YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", , ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-1



# Raw data used to make mosaicplot
SMRace = c(rep("Caucasian", 87), rep("Non-Caucasian", 45))
SMYFresult = c(rep("YF and survived", 45), rep("YF and died", 42), rep("YF and survived", 
    42), rep("YF and died", 3))
table(SMRace, SMYFresult)
##                SMYFresult
## SMRace          YF and died YF and survived
##   Caucasian              42              45
##   Non-Caucasian           3              42

mosaicplot(table(SMRace, SMYFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-1

1855: Norfolk, VA


# Raw data to make contingency tables
NVAcounts <- matrix(c(77, 48, 66, 2, 143, 50), ncol = 2, nrow = 2)
colnames(NVAcounts) <- c("YF and survived", "YF and died")
rownames(NVAcounts) <- c("Caucasians", "Non-Caucasians")
addmargins(NVAcounts)
##                YF and survived YF and died Sum
## Caucasians                  77          66 143
## Non-Caucasians              48           2  50
## Sum                        125          68 193

addmargins(prop.table(NVAcounts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians              0.3990     0.34197 0.7409
## Non-Caucasians          0.2487     0.01036 0.2591
## Sum                     0.6477     0.35233 1.0000
prop.table(NVAcounts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians              0.5385      0.4615
## Non-Caucasians          0.9600      0.0400

# command used to create a segmented bar plot
barplot(t(prop.table(NVAcounts, 1)), main = "Race and Case Fatality in the 1855, Norfolk, VA YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-2


# Raw data used to make mosaicplot
NVARace = c(rep("Caucasian", 143), rep("Non-Caucasian", 50))
NVAYFresult = c(rep("YF and survived", 77), rep("YF and died", 66), rep("YF and survived", 
    48), rep("YF and died", 2))
table(NVARace, NVAYFresult)
##                NVAYFresult
## NVARace         YF and died YF and survived
##   Caucasian              66              77
##   Non-Caucasian           2              48

mosaicplot(table(NVARace, NVAYFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-2

1855: Portsmouth, VA
*Note: Numbers were rounded even in the primary source document.


# Raw data to make contingency tables
PVAcounts <- matrix(c(1243, 1900, 900, 100, 2143, 2000), ncol = 2, nrow = 2)
colnames(PVAcounts) <- c("YF and survived", "YF and died")
rownames(PVAcounts) <- c("Caucasians", "Non-Caucasians")
addmargins(PVAcounts)
##                YF and survived YF and died  Sum
## Caucasians                1243         900 2143
## Non-Caucasians            1900         100 2000
## Sum                       3143        1000 4143

addmargins(prop.table(PVAcounts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians              0.3000     0.21723 0.5173
## Non-Caucasians          0.4586     0.02414 0.4827
## Sum                     0.7586     0.24137 1.0000
prop.table(PVAcounts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians                0.58        0.42
## Non-Caucasians            0.95        0.05

# command used to create a segmented bar plot
barplot(t(prop.table(PVAcounts, 1)), main = "Race and Case Fatality in the 1855, Portsmouth, VA YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", , ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-3


# Raw data used to make mosaicplot
PVARace = c(rep("Caucasian", 2143), rep("Non-Caucasian", 2000))
PVAYFresult = c(rep("YF and survived", 1243), rep("YF and died", 900), rep("YF and survived", 
    1900), rep("YF and died", 100))
table(PVARace, PVAYFresult)
##                PVAYFresult
## PVARace         YF and died YF and survived
##   Caucasian             900            1243
##   Non-Caucasian         100            1900

mosaicplot(table(NVARace, NVAYFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-3

1877: Port Royal, South Carolina, Sea Islands


# Raw data to make contingency tables
PSCcounts <- matrix(c(75, 86, 25, 1, 100, 87), ncol = 2, nrow = 2)
colnames(PSCcounts) <- c("YF and survived", "YF and died")
rownames(PSCcounts) <- c("Caucasians", "Non-Caucasians")
addmargins(PSCcounts)
##                YF and survived YF and died Sum
## Caucasians                  75          25 100
## Non-Caucasians              86           1  87
## Sum                        161          26 187

addmargins(prop.table(PSCcounts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians              0.4011    0.133690 0.5348
## Non-Caucasians          0.4599    0.005348 0.4652
## Sum                     0.8610    0.139037 1.0000
prop.table(PSCcounts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians              0.7500     0.25000
## Non-Caucasians          0.9885     0.01149

# command used to create a segmented bar plot
barplot(t(prop.table(PSCcounts, 1)), main = "Race and Case Fatality in the 1855, Port Royal, SC YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", , ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-4


# Raw data used to make mosaicplot
PSCRace = c(rep("Caucasian", 100), rep("Non-Caucasian", 87))
PSCYFresult = c(rep("YF and survived", 75), rep("YF and died", 25), rep("YF and survived", 
    86), rep("YF and died", 1))
table(PSCRace, PSCYFresult)
##                PSCYFresult
## PSCRace         YF and died YF and survived
##   Caucasian              25              75
##   Non-Caucasian           1              86

mosaicplot(table(PSCRace, PSCYFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-4

1878 Memphis, TN Epidemic

# Raw data to make contingency tables
counts <- matrix(c(1982, 10010, 4024, 990, 6006, 11000), ncol = 2, nrow = 2)
colnames(counts) <- c("YF and survived", "YF and died")
rownames(counts) <- c("Caucasians", "Non-Caucasians")
addmargins(counts)
##                YF and survived YF and died   Sum
## Caucasians                1982        4024  6006
## Non-Caucasians           10010         990 11000
## Sum                      11992        5014 17006

addmargins(prop.table(counts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians              0.1165     0.23662 0.3532
## Non-Caucasians          0.5886     0.05821 0.6468
## Sum                     0.7052     0.29484 1.0000
prop.table(counts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians                0.33        0.67
## Non-Caucasians            0.91        0.09


# command used to create a segmented bar plot
barplot(t(prop.table(counts, 1)), main = "Race and Case Fatality in the 1878 Memphis, TN YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-5


# Raw data used to make mosaicplot
Race = c(rep("Caucasian", 6006), rep("Non-Caucasian", 11000))
YFresult = c(rep("YF and survived", 1982), rep("YF and died", 4024), rep("YF and survived", 
    10010), rep("YF and died", 990))
table(Race, YFresult)
##                YFresult
## Race            YF and died YF and survived
##   Caucasian            4024            1982
##   Non-Caucasian         990           10010

mosaicplot(table(Race, YFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-5

1878 Holly Springs, MS Epidemic

# Raw data to make contingency tables
HScounts <- matrix(c(85, 1129, 219, 85, 304, 1214), ncol = 2, nrow = 2)
colnames(HScounts) <- c("YF and survived", "YF and died")
rownames(HScounts) <- c("Caucasians", "Non-Caucasians")
addmargins(HScounts)
##                YF and survived YF and died  Sum
## Caucasians                  85         219  304
## Non-Caucasians            1129          85 1214
## Sum                       1214         304 1518

addmargins(prop.table(HScounts))  #shows the overall survivor and case fatality rates when both races are combined
##                YF and survived YF and died    Sum
## Caucasians             0.05599     0.14427 0.2003
## Non-Caucasians         0.74374     0.05599 0.7997
## Sum                    0.79974     0.20026 1.0000
prop.table(HScounts, margin = 1)  #showing the differences in race and survival rates (contingency table)
##                YF and survived YF and died
## Caucasians              0.2796     0.72039
## Non-Caucasians          0.9300     0.07002


# command used to create a segmented bar plot
barplot(t(prop.table(HScounts, 1)), main = "Race and Case Fatality in the 1878 Holly Springs, MS YF Epidemic", 
    xlab = "Race", ylab = "Case Fatality", , ylim = c(0, 1.3), col = c("black", 
        "grey63"))
legend("topright", legend = c("YF and survived", "YF and died"), col = c("black", 
    "grey63"), pch = c(15, 15))

plot of chunk unnamed-chunk-6


# Raw data used to make mosaicplot
HSRace = c(rep("Caucasian", 304), rep("Non-Caucasian", 1214))
HSYFresult = c(rep("YF and survived", 85), rep("YF and died", 219), rep("YF and survived", 
    1129), rep("YF and died", 85))
table(Race, YFresult)
##                YFresult
## Race            YF and died YF and survived
##   Caucasian            4024            1982
##   Non-Caucasian         990           10010

mosaicplot(table(HSRace, HSYFresult))  # mosaic plot of the results

plot of chunk unnamed-chunk-6