Load Packages
library(tidyverse)
library(codebookr)
library(summarytools)
library(broom)
library(performance)
library(gt)
library(gtsummary)
library(janitor)
library(forcats)
library(margins)
library(ggplot2)
library(expss)
library(glmtoolbox)
library(DescTools)
Import Data
load("~/Desktop/R-Code/SDOH_Vax/flu_2019_later_1.8.22.rda")
View(flu_2019_later_1.8.22)
Include only patients from Michigan
flu_2019_MI <- flu_2019_later_1.8.22[ which(flu_2019_later_1.8.22$PATIENT_STATE_CD=='MI'), ]
codebook
flu_2019_MI %>%
dplyr::select(ibd_3, age_yrs, gender, race_5, ethnic_3, lang_3, relig_affil, mstat_5, max_ch, PATIENT_STATE_CD, r_pct, IC, insurance, pop_dens, RPL_THEMES, RPL_4, RPL_THEME1, RPL_THEME2, RPL_THEME3, RPL_THEME4, act_tob, flu_2019, , prevnar, pvax, any_pneum, any_pneum, total_cov_vax, total_shingrix) -> flu_clean1
print(dfSummary(flu_clean1), method = 'render')
Data Frame Summary
flu_clean1
Dimensions: 11050 x 27
Duplicates: 0
| No |
Variable |
Label |
Stats / Values |
Freqs (% of Valid) |
Graph |
Valid |
Missing |
| 1 |
ibd_3
[labelled, factor] |
IBD Diagnosis |
| 1. CD | | 2. UC | | 3. IC | | 4. Unknown |
|
| 5508 | ( | 49.8% | ) | | 5468 | ( | 49.5% | ) | | 2 | ( | 0.0% | ) | | 72 | ( | 0.7% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 2 |
age_yrs
[labelled, numeric] |
Age |
| Mean (sd) : 48.8 (19.4) | | min ≤ med ≤ max: | | 1 ≤ 49.2 ≤ 99.9 | | IQR (CV) : 31.5 (0.4) |
|
8992 distinct values |
 |
11050
(100.0%) |
0
(0.0%) |
| 3 |
gender
[labelled, factor] |
Gender |
|
|
 |
11050
(100.0%) |
0
(0.0%) |
| 4 |
race_5
[labelled, factor] |
Race |
| 1. White | | 2. Black | | 3. Asian or Pacific Islander | | 4. American Indian or Alaska | | 5. Other |
|
| 9554 | ( | 86.5% | ) | | 724 | ( | 6.6% | ) | | 277 | ( | 2.5% | ) | | 42 | ( | 0.4% | ) | | 453 | ( | 4.1% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 5 |
ethnic_3
[labelled, factor] |
Ethnicity |
| 1. Hispanic | | 2. Non-Hispanic |
|
|
 |
10720
(97.0%) |
330
(3.0%) |
| 6 |
lang_3
[labelled, factor] |
Preferred Language |
|
|
 |
11050
(100.0%) |
0
(0.0%) |
| 7 |
relig_affil
[labelled, factor] |
Any Religious Affiliation |
|
|
 |
10522
(95.2%) |
528
(4.8%) |
| 8 |
mstat_5
[labelled, factor] |
Marital Status |
| 1. Married | | 2. Single | | 3. Divorced/Separated | | 4. Widowed |
|
| 4347 | ( | 52.6% | ) | | 3383 | ( | 40.9% | ) | | 338 | ( | 4.1% | ) | | 194 | ( | 2.3% | ) |
|
 |
8262
(74.8%) |
2788
(25.2%) |
| 9 |
max_ch
[labelled, numeric] |
Charlson Comorbidity Index |
| Mean (sd) : 3.5 (5) | | min ≤ med ≤ max: | | 0 ≤ 1 ≤ 27 | | IQR (CV) : 5 (1.4) |
|
28 distinct values |
 |
11050
(100.0%) |
0
(0.0%) |
| 10 |
PATIENT_STATE_CD
[labelled, character] |
State |
1. MI |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 11 |
r_pct
[labelled, numeric] |
Percentage Republican Voters in Census
Tract |
| Mean (sd) : 44.5 (17.9) | | min ≤ med ≤ max: | | 1.8 ≤ 47.6 ≤ 81.2 | | IQR (CV) : 24.7 (0.4) |
|
1922 distinct values |
 |
9469
(85.7%) |
1581
(14.3%) |
| 12 |
IC
[labelled, numeric] |
Immunocompromised |
|
| 0 | : | 3602 | ( | 38.0% | ) | | 1 | : | 5872 | ( | 62.0% | ) |
|
 |
9474
(85.7%) |
1576
(14.3%) |
| 13 |
insurance
[labelled, factor] |
Insurance Type |
| 1. Private Insurance | | 2. Medicaid | | 3. Medicare | | 4. Other Governmental | | 5. Other |
|
| 7001 | ( | 63.5% | ) | | 1747 | ( | 15.8% | ) | | 2142 | ( | 19.4% | ) | | 95 | ( | 0.9% | ) | | 47 | ( | 0.4% | ) |
|
 |
11032
(99.8%) |
18
(0.2%) |
| 14 |
pop_dens
[labelled, numeric] |
Population Density of Census Tract |
| Mean (sd) : 2137 (2277.7) | | min ≤ med ≤ max: | | 2.5 ≤ 1520.7 ≤ 19280.6 | | IQR (CV) : 2957.6 (1.1) |
|
2105 distinct values |
 |
10799
(97.7%) |
251
(2.3%) |
| 15 |
RPL_THEMES
[labelled, numeric] |
Social Vulnerability Index |
| Mean (sd) : 0.4 (0.3) | | min ≤ med ≤ max: | | 0 ≤ 0.3 ≤ 1 | | IQR (CV) : 0.4 (0.7) |
|
2099 distinct values |
 |
11014
(99.7%) |
36
(0.3%) |
| 16 |
RPL_4
[labelled, factor] |
SVI by Quartile |
| 1. First | | 2. Second | | 3. Third | | 4. Fourth |
|
| 4472 | ( | 40.6% | ) | | 3317 | ( | 30.1% | ) | | 2170 | ( | 19.7% | ) | | 1055 | ( | 9.6% | ) |
|
 |
11014
(99.7%) |
36
(0.3%) |
| 17 |
RPL_THEME1
[labelled, numeric] |
Socioeconomic Status |
| Mean (sd) : 0.3 (0.3) | | min ≤ med ≤ max: | | 0 ≤ 0.3 ≤ 1 | | IQR (CV) : 0.4 (0.7) |
|
2062 distinct values |
 |
10970
(99.3%) |
80
(0.7%) |
| 18 |
RPL_THEME2
[labelled, numeric] |
Household Composition |
| Mean (sd) : 0.4 (0.3) | | min ≤ med ≤ max: | | 0 ≤ 0.3 ≤ 1 | | IQR (CV) : 0.4 (0.7) |
|
2018 distinct values |
 |
11014
(99.7%) |
36
(0.3%) |
| 19 |
RPL_THEME3
[labelled, numeric] |
Minority and Language Status |
| Mean (sd) : 0.5 (0.3) | | min ≤ med ≤ max: | | 0 ≤ 0.5 ≤ 1 | | IQR (CV) : 0.5 (0.6) |
|
1434 distinct values |
 |
11020
(99.7%) |
30
(0.3%) |
| 20 |
RPL_THEME4
[labelled, numeric] |
Housing and Transportation |
| Mean (sd) : 0.4 (0.3) | | min ≤ med ≤ max: | | 0 ≤ 0.4 ≤ 1 | | IQR (CV) : 0.5 (0.7) |
|
2034 distinct values |
 |
10997
(99.5%) |
53
(0.5%) |
| 21 |
act_tob
[labelled, factor] |
Active Tobacco Use |
|
|
 |
10879
(98.5%) |
171
(1.5%) |
| 22 |
flu_2019
[labelled, numeric] |
2019 Flu Vaccination |
|
| 0 | : | 6708 | ( | 60.7% | ) | | 1 | : | 4342 | ( | 39.3% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 23 |
prevnar
[labelled, numeric] |
Pneumococcal Conjugate Vaccination |
| Mean (sd) : 0.4 (0.6) | | min ≤ med ≤ max: | | 0 ≤ 0 ≤ 8 | | IQR (CV) : 1 (1.4) |
|
| 0 | : | 6938 | ( | 62.8% | ) | | 1 | : | 3856 | ( | 34.9% | ) | | 2 | : | 198 | ( | 1.8% | ) | | 3 | : | 27 | ( | 0.2% | ) | | 4 | : | 24 | ( | 0.2% | ) | | 5 | : | 4 | ( | 0.0% | ) | | 6 | : | 1 | ( | 0.0% | ) | | 7 | : | 1 | ( | 0.0% | ) | | 8 | : | 1 | ( | 0.0% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 24 |
pvax
[labelled, numeric] |
Pneumococcal Polysaccharide Vaccination |
| Mean (sd) : 0.4 (0.5) | | min ≤ med ≤ max: | | 0 ≤ 0 ≤ 6 | | IQR (CV) : 1 (1.5) |
|
| 0 | : | 7439 | ( | 67.3% | ) | | 1 | : | 3336 | ( | 30.2% | ) | | 2 | : | 261 | ( | 2.4% | ) | | 3 | : | 11 | ( | 0.1% | ) | | 5 | : | 1 | ( | 0.0% | ) | | 6 | : | 2 | ( | 0.0% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 25 |
any_pneum
[labelled, numeric] |
Any Pneumonia Vaccine |
| Mean (sd) : 0.8 (0.9) | | min ≤ med ≤ max: | | 0 ≤ 0 ≤ 9 | | IQR (CV) : 1 (1.3) |
|
| 0 | : | 5916 | ( | 53.5% | ) | | 1 | : | 2397 | ( | 21.7% | ) | | 2 | : | 2361 | ( | 21.4% | ) | | 3 | : | 289 | ( | 2.6% | ) | | 4 | : | 61 | ( | 0.6% | ) | | 5 | : | 15 | ( | 0.1% | ) | | 6 | : | 7 | ( | 0.1% | ) | | 7 | : | 2 | ( | 0.0% | ) | | 8 | : | 1 | ( | 0.0% | ) | | 9 | : | 1 | ( | 0.0% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 26 |
total_cov_vax
[labelled, numeric] |
Total Number of COVID-19 Vaccines |
| Mean (sd) : 1.9 (1.6) | | min ≤ med ≤ max: | | 0 ≤ 2 ≤ 7 | | IQR (CV) : 3 (0.8) |
|
| 0 | : | 3894 | ( | 35.2% | ) | | 1 | : | 397 | ( | 3.6% | ) | | 2 | : | 2056 | ( | 18.6% | ) | | 3 | : | 3045 | ( | 27.6% | ) | | 4 | : | 1455 | ( | 13.2% | ) | | 5 | : | 157 | ( | 1.4% | ) | | 6 | : | 37 | ( | 0.3% | ) | | 7 | : | 9 | ( | 0.1% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
| 27 |
total_shingrix
[labelled, numeric] |
Total Number of Zoster Vaccines |
| Mean (sd) : 0.3 (0.7) | | min ≤ med ≤ max: | | 0 ≤ 0 ≤ 5 | | IQR (CV) : 0 (2.6) |
|
| 0 | : | 9529 | ( | 86.2% | ) | | 1 | : | 343 | ( | 3.1% | ) | | 2 | : | 1081 | ( | 9.8% | ) | | 3 | : | 86 | ( | 0.8% | ) | | 4 | : | 9 | ( | 0.1% | ) | | 5 | : | 2 | ( | 0.0% | ) |
|
 |
11050
(100.0%) |
0
(0.0%) |
Generated by summarytools 1.0.1 (R version 4.2.2)
2023-01-08
Patient Characteristics
Baseline Characteristics
flu_clean1 %>%
dplyr::select(ibd_3, age_yrs, gender, race_5, ethnic_3, lang_3, relig_affil, mstat_5, act_tob, max_ch, insurance, IC, pop_dens,r_pct, RPL_THEMES, RPL_4, RPL_THEME1, RPL_THEME2, RPL_THEME3, RPL_THEME4, flu_2019) -> baseline
baseline %>% tbl_summary(
statistic = list(all_continuous() ~ "{mean} ({sd})"),
missing_text = "(Missing)")
| Characteristic |
N = 11,050 |
| IBD Diagnosis |
|
| Â Â Â Â CD |
5,508 (50%) |
| Â Â Â Â UC |
5,468 (49%) |
| Â Â Â Â IC |
2 (<0.1%) |
| Â Â Â Â Unknown |
72 (0.7%) |
| Age |
49 (19) |
| Gender |
|
| Â Â Â Â Male |
5,029 (46%) |
| Â Â Â Â Female |
6,021 (54%) |
| Race |
|
| Â Â Â Â White |
9,554 (86%) |
| Â Â Â Â Black |
724 (6.6%) |
| Â Â Â Â Asian or Pacific Islander |
277 (2.5%) |
| Â Â Â Â American Indian or Alaska Native |
42 (0.4%) |
| Â Â Â Â Other |
453 (4.1%) |
| Ethnicity |
|
| Â Â Â Â Hispanic |
231 (2.2%) |
| Â Â Â Â Non-Hispanic |
10,489 (98%) |
| Â Â Â Â (Missing) |
330 |
| Preferred Language |
|
| Â Â Â Â English |
10,933 (99%) |
| Â Â Â Â Other |
117 (1.1%) |
| Any Religious Affiliation |
6,071 (58%) |
| Â Â Â Â (Missing) |
528 |
| Marital Status |
|
| Â Â Â Â Married |
4,347 (53%) |
| Â Â Â Â Single |
3,383 (41%) |
| Â Â Â Â Divorced/Separated |
338 (4.1%) |
| Â Â Â Â Widowed |
194 (2.3%) |
| Â Â Â Â (Missing) |
2,788 |
| Active Tobacco Use |
1,305 (12%) |
| Â Â Â Â (Missing) |
171 |
| Charlson Comorbidity Index |
3.5 (5.0) |
| Insurance Type |
|
| Â Â Â Â Private Insurance |
7,001 (63%) |
| Â Â Â Â Medicaid |
1,747 (16%) |
| Â Â Â Â Medicare |
2,142 (19%) |
| Â Â Â Â Other Governmental |
95 (0.9%) |
| Â Â Â Â Other |
47 (0.4%) |
| Â Â Â Â (Missing) |
18 |
| Immunocompromised |
5,872 (62%) |
| Â Â Â Â (Missing) |
1,576 |
| Population Density of Census Tract |
2,137 (2,278) |
| Â Â Â Â (Missing) |
251 |
| Percentage Republican Voters in Census Tract |
45 (18) |
| Â Â Â Â (Missing) |
1,581 |
| Social Vulnerability Index |
0.36 (0.26) |
| Â Â Â Â (Missing) |
36 |
| SVI by Quartile |
|
| Â Â Â Â First |
4,472 (41%) |
| Â Â Â Â Second |
3,317 (30%) |
| Â Â Â Â Third |
2,170 (20%) |
| Â Â Â Â Fourth |
1,055 (9.6%) |
| Â Â Â Â (Missing) |
36 |
| Socioeconomic Status |
0.34 (0.25) |
| Â Â Â Â (Missing) |
80 |
| Household Composition |
0.39 (0.26) |
| Â Â Â Â (Missing) |
36 |
| Minority and Language Status |
0.48 (0.29) |
| Â Â Â Â (Missing) |
30 |
| Housing and Transportation |
0.43 (0.29) |
| Â Â Â Â (Missing) |
53 |
| 2019 Flu Vaccination |
4,342 (39%) |
Baseline characteristics by SVI Quartile
flu_clean1 %>% tbl_summary(by = RPL_4,
statistic = list(all_continuous() ~ "{mean} ({sd})"),
missing_text = "(Missing)") %>% add_p()
36 observations missing `RPL_4` have been removed. To include these observations, use `forcats::fct_explicit_na()` on `RPL_4` column before passing to `tbl_summary()`.
There was an error in 'add_p()/add_difference()' for variable 'ibd_3', p-value omitted:
Error in stats::fisher.test(structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, : FEXACT error 501.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'race_5', p-value omitted:
Error in stats::fisher.test(structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'PATIENT_STATE_CD', p-value omitted:
Error in stats::chisq.test(x = structure(c("MI", "MI", "MI", "MI", "MI", : 'x' and 'y' must have at least 2 levels
There was an error in 'add_p()/add_difference()' for variable 'insurance', p-value omitted:
Error in stats::fisher.test(structure(c(1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'prevnar', p-value omitted:
Error in stats::fisher.test(structure(c(1, 1, 2, 0, 1, 0, 0, 0, 0, 1, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'pvax', p-value omitted:
Error in stats::fisher.test(structure(c(1, 0, 2, 0, 0, 1, 0, 0, 0, 0, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'total_cov_vax', p-value omitted:
Error in stats::fisher.test(structure(c(2, 1, 3, 1, 3, 2, 0, 0, 4, 3, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
There was an error in 'add_p()/add_difference()' for variable 'total_shingrix', p-value omitted:
Error in stats::fisher.test(structure(c(0, 0, 2, 0, 0, 0, 0, 0, 2, 0, : FEXACT error 5.
The hash table key cannot be computed because the largest key
is larger than the largest representable int.
The algorithm cannot proceed.
Reduce the workspace, consider using 'simulate.p.value=TRUE' or another algorithm.
| Characteristic |
First, N = 4,472 |
Second, N = 3,317 |
Third, N = 2,170 |
Fourth, N = 1,055 |
p-value |
| IBD Diagnosis |
|
|
|
|
|
| Â Â Â Â CD |
2,097 (47%) |
1,621 (49%) |
1,147 (53%) |
625 (59%) |
|
| Â Â Â Â UC |
2,346 (52%) |
1,673 (50%) |
1,009 (46%) |
424 (40%) |
|
| Â Â Â Â IC |
0 (0%) |
0 (0%) |
1 (<0.1%) |
1 (<0.1%) |
|
| Â Â Â Â Unknown |
29 (0.6%) |
23 (0.7%) |
13 (0.6%) |
5 (0.5%) |
|
| Age |
49 (20) |
49 (19) |
49 (19) |
47 (19) |
0.003 |
| Gender |
|
|
|
|
0.025 |
| Â Â Â Â Male |
2,091 (47%) |
1,519 (46%) |
933 (43%) |
465 (44%) |
|
| Â Â Â Â Female |
2,381 (53%) |
1,798 (54%) |
1,237 (57%) |
590 (56%) |
|
| Race |
|
|
|
|
|
| Â Â Â Â White |
4,043 (90%) |
2,900 (87%) |
1,852 (85%) |
729 (69%) |
|
| Â Â Â Â Black |
112 (2.5%) |
168 (5.1%) |
188 (8.7%) |
252 (24%) |
|
| Â Â Â Â Asian or Pacific Islander |
121 (2.7%) |
102 (3.1%) |
48 (2.2%) |
6 (0.6%) |
|
| Â Â Â Â American Indian or Alaska Native |
12 (0.3%) |
20 (0.6%) |
7 (0.3%) |
3 (0.3%) |
|
| Â Â Â Â Other |
184 (4.1%) |
127 (3.8%) |
75 (3.5%) |
65 (6.2%) |
|
| Ethnicity |
|
|
|
|
0.003 |
| Â Â Â Â Hispanic |
80 (1.8%) |
68 (2.1%) |
45 (2.1%) |
38 (3.7%) |
|
| Â Â Â Â Non-Hispanic |
4,251 (98%) |
3,157 (98%) |
2,064 (98%) |
983 (96%) |
|
| Â Â Â Â (Missing) |
141 |
92 |
61 |
34 |
|
| Preferred Language |
|
|
|
|
<0.001 |
| Â Â Â Â English |
4,444 (99%) |
3,285 (99%) |
2,136 (98%) |
1,032 (98%) |
|
| Â Â Â Â Other |
28 (0.6%) |
32 (1.0%) |
34 (1.6%) |
23 (2.2%) |
|
| Any Religious Affiliation |
2,509 (58%) |
1,812 (57%) |
1,194 (58%) |
538 (55%) |
0.2 |
| Â Â Â Â (Missing) |
179 |
163 |
114 |
70 |
|
| Marital Status |
|
|
|
|
<0.001 |
| Â Â Â Â Married |
2,020 (58%) |
1,286 (52%) |
752 (48%) |
280 (39%) |
|
| Â Â Â Â Single |
1,294 (37%) |
1,002 (41%) |
683 (44%) |
392 (54%) |
|
| Â Â Â Â Divorced/Separated |
91 (2.6%) |
118 (4.8%) |
89 (5.7%) |
40 (5.5%) |
|
| Â Â Â Â Widowed |
82 (2.4%) |
60 (2.4%) |
40 (2.6%) |
12 (1.7%) |
|
| Â Â Â Â (Missing) |
985 |
851 |
606 |
331 |
|
| Charlson Comorbidity Index |
3.4 (5.0) |
3.6 (5.1) |
3.5 (5.0) |
3.5 (5.0) |
0.010 |
| State |
|
|
|
|
|
| Â Â Â Â MI |
4,472 (100%) |
3,317 (100%) |
2,170 (100%) |
1,055 (100%) |
|
| Percentage Republican Voters in Census Tract |
45 (16) |
46 (18) |
45 (18) |
36 (21) |
<0.001 |
| Â Â Â Â (Missing) |
459 |
601 |
350 |
168 |
|
| Immunocompromised |
2,373 (61%) |
1,737 (61%) |
1,140 (62%) |
601 (66%) |
0.036 |
| Â Â Â Â (Missing) |
603 |
479 |
341 |
148 |
|
| Insurance Type |
|
|
|
|
|
| Â Â Â Â Private Insurance |
3,251 (73%) |
2,142 (65%) |
1,170 (54%) |
415 (39%) |
|
| Â Â Â Â Medicaid |
391 (8.8%) |
482 (15%) |
489 (23%) |
378 (36%) |
|
| Â Â Â Â Medicare |
776 (17%) |
638 (19%) |
475 (22%) |
248 (24%) |
|
| Â Â Â Â Other Governmental |
28 (0.6%) |
27 (0.8%) |
28 (1.3%) |
12 (1.1%) |
|
| Â Â Â Â Other |
17 (0.4%) |
21 (0.6%) |
8 (0.4%) |
1 (<0.1%) |
|
| Â Â Â Â (Missing) |
9 |
7 |
0 |
1 |
|
| Population Density of Census Tract |
1,880 (1,862) |
2,086 (2,404) |
2,325 (2,522) |
3,034 (2,694) |
<0.001 |
| Â Â Â Â (Missing) |
34 |
63 |
73 |
50 |
|
| Social Vulnerability Index |
0.12 (0.07) |
0.37 (0.07) |
0.61 (0.07) |
0.86 (0.07) |
<0.001 |
| Socioeconomic Status |
0.13 (0.11) |
0.33 (0.16) |
0.57 (0.15) |
0.78 (0.11) |
<0.001 |
| Â Â Â Â (Missing) |
44 |
0 |
0 |
0 |
|
| Household Composition |
0.21 (0.14) |
0.37 (0.21) |
0.59 (0.24) |
0.76 (0.19) |
<0.001 |
| Minority and Language Status |
0.41 (0.27) |
0.48 (0.29) |
0.52 (0.29) |
0.66 (0.25) |
<0.001 |
| Housing and Transportation |
0.19 (0.16) |
0.49 (0.20) |
0.63 (0.21) |
0.81 (0.17) |
<0.001 |
| Â Â Â Â (Missing) |
17 |
0 |
0 |
0 |
|
| Active Tobacco Use |
361 (8.2%) |
406 (12%) |
325 (15%) |
207 (20%) |
<0.001 |
| Â Â Â Â (Missing) |
49 |
60 |
36 |
25 |
|
| 2019 Flu Vaccination |
1,990 (44%) |
1,291 (39%) |
731 (34%) |
317 (30%) |
<0.001 |
| Pneumococcal Conjugate Vaccination |
|
|
|
|
|
| Â Â Â Â 0 |
2,649 (59%) |
2,129 (64%) |
1,418 (65%) |
717 (68%) |
|
| Â Â Â Â 1 |
1,724 (39%) |
1,107 (33%) |
698 (32%) |
317 (30%) |
|
| Â Â Â Â 2 |
80 (1.8%) |
63 (1.9%) |
37 (1.7%) |
17 (1.6%) |
|
| Â Â Â Â 3 |
7 (0.2%) |
10 (0.3%) |
7 (0.3%) |
3 (0.3%) |
|
| Â Â Â Â 4 |
10 (0.2%) |
6 (0.2%) |
7 (0.3%) |
1 (<0.1%) |
|
| Â Â Â Â 5 |
1 (<0.1%) |
2 (<0.1%) |
1 (<0.1%) |
0 (0%) |
|
| Â Â Â Â 6 |
0 (0%) |
0 (0%) |
1 (<0.1%) |
0 (0%) |
|
| Â Â Â Â 7 |
1 (<0.1%) |
0 (0%) |
0 (0%) |
0 (0%) |
|
| Â Â Â Â 8 |
0 (0%) |
0 (0%) |
1 (<0.1%) |
0 (0%) |
|
| Pneumococcal Polysaccharide Vaccination |
|
|
|
|
|
| Â Â Â Â 0 |
2,903 (65%) |
2,266 (68%) |
1,497 (69%) |
744 (71%) |
|
| Â Â Â Â 1 |
1,467 (33%) |
952 (29%) |
625 (29%) |
286 (27%) |
|
| Â Â Â Â 2 |
96 (2.1%) |
95 (2.9%) |
46 (2.1%) |
23 (2.2%) |
|
| Â Â Â Â 3 |
5 (0.1%) |
2 (<0.1%) |
2 (<0.1%) |
2 (0.2%) |
|
| Â Â Â Â 5 |
0 (0%) |
1 (<0.1%) |
0 (0%) |
0 (0%) |
|
| Â Â Â Â 6 |
1 (<0.1%) |
1 (<0.1%) |
0 (0%) |
0 (0%) |
|
| Any Pneumonia Vaccine |
0.81 (0.95) |
0.74 (0.96) |
0.72 (0.95) |
0.67 (0.91) |
<0.001 |
| Total Number of COVID-19 Vaccines |
|
|
|
|
|
| Â Â Â Â 0 |
1,286 (29%) |
1,205 (36%) |
872 (40%) |
515 (49%) |
|
| Â Â Â Â 1 |
162 (3.6%) |
103 (3.1%) |
89 (4.1%) |
42 (4.0%) |
|
| Â Â Â Â 2 |
815 (18%) |
615 (19%) |
410 (19%) |
211 (20%) |
|
| Â Â Â Â 3 |
1,401 (31%) |
871 (26%) |
558 (26%) |
204 (19%) |
|
| Â Â Â Â 4 |
704 (16%) |
464 (14%) |
212 (9.8%) |
72 (6.8%) |
|
| Â Â Â Â 5 |
84 (1.9%) |
44 (1.3%) |
21 (1.0%) |
8 (0.8%) |
|
| Â Â Â Â 6 |
16 (0.4%) |
13 (0.4%) |
5 (0.2%) |
3 (0.3%) |
|
| Â Â Â Â 7 |
4 (<0.1%) |
2 (<0.1%) |
3 (0.1%) |
0 (0%) |
|
| Total Number of Zoster Vaccines |
|
|
|
|
|
| Â Â Â Â 0 |
3,699 (83%) |
2,879 (87%) |
1,933 (89%) |
985 (93%) |
|
| Â Â Â Â 1 |
163 (3.6%) |
86 (2.6%) |
72 (3.3%) |
22 (2.1%) |
|
| Â Â Â Â 2 |
560 (13%) |
324 (9.8%) |
154 (7.1%) |
40 (3.8%) |
|
| Â Â Â Â 3 |
46 (1.0%) |
25 (0.8%) |
9 (0.4%) |
6 (0.6%) |
|
| Â Â Â Â 4 |
4 (<0.1%) |
3 (<0.1%) |
1 (<0.1%) |
1 (<0.1%) |
|
| Â Â Â Â 5 |
0 (0%) |
0 (0%) |
1 (<0.1%) |
1 (<0.1%) |
|
Bivariate Analysis
tbl_uv_ex1 <-
tbl_uvregression(
flu_clean1[c("flu_2019", "ibd_3", "age_yrs", "gender", "race_5", "ethnic_3", "lang_3", "mstat_5", "relig_affil", "act_tob", "max_ch", "IC", "insurance", "pop_dens", "r_pct", "RPL_THEMES", "RPL_THEME1", "RPL_THEME2", "RPL_THEME3", "RPL_THEME4")],
method = glm,
method.args = list(family = binomial),
y = flu_2019,
exponentiate = TRUE)
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurred
print(tbl_uv_ex1, method = render)
`...` must be empty.
✖ Problematic argument:
• method = render
| Characteristic |
N |
OR |
95% CI |
p-value |
| IBD Diagnosis |
11,050 |
|
|
|
| Â Â Â Â CD |
|
— |
— |
|
| Â Â Â Â UC |
|
0.98 |
0.91, 1.06 |
0.6 |
| Â Â Â Â IC |
|
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
|
0.47 |
0.26, 0.79 |
0.007 |
| Age |
11,050 |
0.99 |
0.99, 0.99 |
<0.001 |
| Gender |
11,050 |
|
|
|
| Â Â Â Â Male |
|
— |
— |
|
| Â Â Â Â Female |
|
1.10 |
1.02, 1.19 |
0.017 |
| Race |
11,050 |
|
|
|
| Â Â Â Â White |
|
— |
— |
|
| Â Â Â Â Black |
|
0.74 |
0.63, 0.86 |
<0.001 |
| Â Â Â Â Asian or Pacific Islander |
|
1.72 |
1.36, 2.19 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
|
1.26 |
0.68, 2.31 |
0.5 |
| Â Â Â Â Other |
|
0.78 |
0.64, 0.96 |
0.017 |
| Ethnicity |
10,720 |
|
|
|
| Â Â Â Â Hispanic |
|
— |
— |
|
| Â Â Â Â Non-Hispanic |
|
0.78 |
0.60, 1.01 |
0.059 |
| Preferred Language |
11,050 |
|
|
|
| Â Â Â Â English |
|
— |
— |
|
| Â Â Â Â Other |
|
0.63 |
0.42, 0.93 |
0.024 |
| Marital Status |
8,262 |
|
|
|
| Â Â Â Â Married |
|
— |
— |
|
| Â Â Â Â Single |
|
0.96 |
0.87, 1.05 |
0.4 |
| Â Â Â Â Divorced/Separated |
|
0.89 |
0.71, 1.12 |
0.3 |
| Â Â Â Â Widowed |
|
0.58 |
0.42, 0.79 |
<0.001 |
| Any Religious Affiliation |
10,522 |
|
|
|
| Â Â Â Â Yes |
|
— |
— |
|
| Â Â Â Â No |
|
0.92 |
0.85, 1.00 |
0.047 |
| Active Tobacco Use |
10,879 |
|
|
|
| Â Â Â Â No |
|
— |
— |
|
| Â Â Â Â Yes |
|
0.70 |
0.62, 0.79 |
<0.001 |
| Charlson Comorbidity Index |
11,050 |
1.00 |
0.99, 1.01 |
0.9 |
| Immunocompromised |
9,474 |
1.61 |
1.47, 1.75 |
<0.001 |
| Insurance Type |
11,032 |
|
|
|
| Â Â Â Â Private Insurance |
|
— |
— |
|
| Â Â Â Â Medicaid |
|
0.53 |
0.47, 0.59 |
<0.001 |
| Â Â Â Â Medicare |
|
0.47 |
0.43, 0.53 |
<0.001 |
| Â Â Â Â Other Governmental |
|
0.28 |
0.16, 0.46 |
<0.001 |
| Â Â Â Â Other |
|
1.26 |
0.71, 2.25 |
0.4 |
| Population Density of Census Tract |
10,799 |
1.00 |
1.00, 1.00 |
<0.001 |
| Percentage Republican Voters in Census Tract |
9,469 |
0.99 |
0.99, 0.99 |
<0.001 |
| Social Vulnerability Index |
11,014 |
0.42 |
0.36, 0.49 |
<0.001 |
| Socioeconomic Status |
10,970 |
0.39 |
0.33, 0.45 |
<0.001 |
| Household Composition |
11,014 |
0.39 |
0.34, 0.45 |
<0.001 |
| Minority and Language Status |
11,020 |
1.34 |
1.17, 1.53 |
<0.001 |
| Housing and Transportation |
10,997 |
0.62 |
0.54, 0.71 |
<0.001 |
NULL
Flu 2019 with SVI as Continuous Variable
Flu2019_SVI <- glm(flu_2019 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + mstat_5 + relig_affil
+ lang_3 + act_tob + max_ch + IC + insurance
+ pop_dens + RPL_THEMES,
family = "binomial",
data = flu_clean1)
summary(Flu2019_SVI )
Call:
glm(formula = flu_2019 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + mstat_5 + relig_affil + lang_3 + act_tob + max_ch +
IC + insurance + pop_dens + RPL_THEMES, family = "binomial",
data = flu_clean1)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8556 -1.0881 -0.7645 1.1471 2.1871
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.124e-01 2.398e-01 2.971 0.002968 **
ibd_3UC 1.531e-02 5.508e-02 0.278 0.781014
ibd_3Unknown -9.009e-03 4.847e-01 -0.019 0.985171
age_yrs -8.070e-03 2.095e-03 -3.852 0.000117 ***
genderFemale 1.598e-01 5.251e-02 3.043 0.002343 **
race_5Black -3.344e-01 1.128e-01 -2.965 0.003026 **
race_5Asian or Pacific Islander 6.545e-01 1.792e-01 3.652 0.000261 ***
race_5American Indian or Alaska Native 6.103e-02 4.298e-01 0.142 0.887080
race_5Other -1.441e-01 1.613e-01 -0.893 0.371937
ethnic_3Non-Hispanic -5.060e-01 1.978e-01 -2.558 0.010533 *
mstat_5Single -1.776e-01 6.720e-02 -2.642 0.008235 **
mstat_5Divorced/Separated 1.249e-01 1.385e-01 0.902 0.367280
mstat_5Widowed -3.099e-01 1.871e-01 -1.656 0.097638 .
relig_affilNo -1.317e-01 5.377e-02 -2.449 0.014321 *
lang_3Other 3.723e-02 3.158e-01 0.118 0.906152
act_tobYes -2.142e-01 8.557e-02 -2.503 0.012319 *
max_ch 2.736e-02 5.732e-03 4.774 1.81e-06 ***
IC 4.450e-01 5.914e-02 7.525 5.27e-14 ***
insuranceMedicaid -4.876e-01 8.135e-02 -5.994 2.05e-09 ***
insuranceMedicare -5.956e-01 8.226e-02 -7.240 4.50e-13 ***
insuranceOther Governmental -1.302e+00 3.789e-01 -3.436 0.000591 ***
insuranceOther 3.923e-01 3.790e-01 1.035 0.300556
pop_dens 5.417e-05 1.195e-05 4.532 5.83e-06 ***
RPL_THEMES -7.006e-01 1.109e-01 -6.319 2.63e-10 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8886.3 on 6443 degrees of freedom
Residual deviance: 8490.5 on 6420 degrees of freedom
(4606 observations deleted due to missingness)
AIC: 8538.5
Number of Fisher Scoring iterations: 4
broom::glance(Flu2019_SVI )
broom::tidy(Flu2019_SVI , exponentiate = TRUE)
tbl_regression(Flu2019_SVI, exponentiate = TRUE)
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.02 |
0.91, 1.13 |
0.8 |
| Â Â Â Â Unknown |
0.99 |
0.37, 2.54 |
>0.9 |
| Age |
0.99 |
0.99, 1.00 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.17 |
1.06, 1.30 |
0.002 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.72 |
0.57, 0.89 |
0.003 |
| Â Â Â Â Asian or Pacific Islander |
1.92 |
1.36, 2.75 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
1.06 |
0.45, 2.48 |
0.9 |
| Â Â Â Â Other |
0.87 |
0.63, 1.19 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.60 |
0.41, 0.89 |
0.011 |
| Marital Status |
|
|
|
| Â Â Â Â Married |
— |
— |
|
| Â Â Â Â Single |
0.84 |
0.73, 0.96 |
0.008 |
| Â Â Â Â Divorced/Separated |
1.13 |
0.86, 1.49 |
0.4 |
| Â Â Â Â Widowed |
0.73 |
0.50, 1.05 |
0.10 |
| Any Religious Affiliation |
|
|
|
| Â Â Â Â Yes |
— |
— |
|
| Â Â Â Â No |
0.88 |
0.79, 0.97 |
0.014 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.04 |
0.55, 1.92 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.81 |
0.68, 0.95 |
0.012 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.04 |
<0.001 |
| Immunocompromised |
1.56 |
1.39, 1.75 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.61 |
0.52, 0.72 |
<0.001 |
| Â Â Â Â Medicare |
0.55 |
0.47, 0.65 |
<0.001 |
| Â Â Â Â Other Governmental |
0.27 |
0.12, 0.55 |
<0.001 |
| Â Â Â Â Other |
1.48 |
0.71, 3.19 |
0.3 |
| Population Density of Census Tract |
1.00 |
1.00, 1.00 |
<0.001 |
| Social Vulnerability Index |
0.50 |
0.40, 0.62 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Flu2019_SVI)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 12.83896
degrees of freedom = 9
p-value = 0.17003
# C-Statistic/AUROC
Cstat(Flu2019_SVI)
[1] 0.6413064
# Model performance
model_performance(Flu2019_SVI)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
8538.492 | 8538.679 | 8700.994 | 0.060 | 0.483 | 1.150 | 0.659 | -Inf | 1.552e-04 | 0.533
performance::check_model(Flu2019_SVI)
Variable `Component` is not in your data frame :/

# Margins
cplot(Flu2019_SVI, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given SVI")

Flu 2019 with log(SVI)
Flu2019_SVI_log <- glm(flu_2019 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
mstat_5 + relig_affil + lang_3 + act_tob + max_ch + IC + insurance
+ pop_dens + log(RPL_THEMES),
family = "binomial",
data = flu_clean1)
summary(Flu2019_SVI_log )
Call:
glm(formula = flu_2019 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + mstat_5 + relig_affil + lang_3 + act_tob + max_ch +
IC + insurance + pop_dens + log(RPL_THEMES), family = "binomial",
data = flu_clean1)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8243 -1.0884 -0.7733 1.1494 2.2051
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.746e-01 2.399e-01 1.145 0.252341
ibd_3UC 2.287e-02 5.498e-02 0.416 0.677399
ibd_3Unknown 3.166e-02 4.844e-01 0.065 0.947883
age_yrs -7.929e-03 2.092e-03 -3.791 0.000150 ***
genderFemale 1.573e-01 5.245e-02 2.998 0.002715 **
race_5Black -3.956e-01 1.114e-01 -3.550 0.000385 ***
race_5Asian or Pacific Islander 6.710e-01 1.791e-01 3.747 0.000179 ***
race_5American Indian or Alaska Native 8.687e-02 4.294e-01 0.202 0.839670
race_5Other -1.404e-01 1.612e-01 -0.871 0.383552
ethnic_3Non-Hispanic -4.810e-01 1.972e-01 -2.439 0.014718 *
mstat_5Single -1.766e-01 6.710e-02 -2.633 0.008468 **
mstat_5Divorced/Separated 1.160e-01 1.383e-01 0.838 0.401812
mstat_5Widowed -3.067e-01 1.871e-01 -1.639 0.101127
relig_affilNo -1.336e-01 5.372e-02 -2.487 0.012872 *
lang_3Other 2.627e-03 3.144e-01 0.008 0.993333
act_tobYes -2.213e-01 8.541e-02 -2.591 0.009581 **
max_ch 2.691e-02 5.725e-03 4.701 2.59e-06 ***
IC 4.457e-01 5.911e-02 7.540 4.70e-14 ***
insuranceMedicaid -5.162e-01 8.089e-02 -6.381 1.76e-10 ***
insuranceMedicare -6.107e-01 8.204e-02 -7.444 9.78e-14 ***
insuranceOther Governmental -1.324e+00 3.781e-01 -3.502 0.000462 ***
insuranceOther 3.967e-01 3.791e-01 1.046 0.295422
pop_dens 5.047e-05 1.188e-05 4.250 2.14e-05 ***
log(RPL_THEMES) -1.243e-01 2.396e-02 -5.187 2.14e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8886.3 on 6443 degrees of freedom
Residual deviance: 8503.7 on 6420 degrees of freedom
(4606 observations deleted due to missingness)
AIC: 8551.7
Number of Fisher Scoring iterations: 4
broom::glance(Flu2019_SVI_log )
broom::tidy(Flu2019_SVI_log , exponentiate = TRUE)
tbl_regression(Flu2019_SVI_log, exponentiate = TRUE)
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.02 |
0.92, 1.14 |
0.7 |
| Â Â Â Â Unknown |
1.03 |
0.39, 2.65 |
>0.9 |
| Age |
0.99 |
0.99, 1.00 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.17 |
1.06, 1.30 |
0.003 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.67 |
0.54, 0.84 |
<0.001 |
| Â Â Â Â Asian or Pacific Islander |
1.96 |
1.38, 2.80 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
1.09 |
0.46, 2.54 |
0.8 |
| Â Â Â Â Other |
0.87 |
0.63, 1.19 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.62 |
0.42, 0.91 |
0.015 |
| Marital Status |
|
|
|
| Â Â Â Â Married |
— |
— |
|
| Â Â Â Â Single |
0.84 |
0.73, 0.96 |
0.008 |
| Â Â Â Â Divorced/Separated |
1.12 |
0.86, 1.47 |
0.4 |
| Â Â Â Â Widowed |
0.74 |
0.51, 1.06 |
0.10 |
| Any Religious Affiliation |
|
|
|
| Â Â Â Â Yes |
— |
— |
|
| Â Â Â Â No |
0.87 |
0.79, 0.97 |
0.013 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.00 |
0.54, 1.85 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.80 |
0.68, 0.95 |
0.010 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.04 |
<0.001 |
| Immunocompromised |
1.56 |
1.39, 1.75 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.60 |
0.51, 0.70 |
<0.001 |
| Â Â Â Â Medicare |
0.54 |
0.46, 0.64 |
<0.001 |
| Â Â Â Â Other Governmental |
0.27 |
0.12, 0.53 |
<0.001 |
| Â Â Â Â Other |
1.49 |
0.71, 3.21 |
0.3 |
| Population Density of Census Tract |
1.00 |
1.00, 1.00 |
<0.001 |
| Social Vulnerability Index |
0.88 |
0.84, 0.93 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Flu2019_SVI_log)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 12.99612
degrees of freedom = 9
p-value = 0.16278
# C-Statistic/AUROC
Cstat(Flu2019_SVI_log)
[1] 0.6400605
# Model performance
model_performance(Flu2019_SVI_log)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
8551.703 | 8551.890 | 8714.205 | 0.058 | 0.483 | 1.151 | 0.660 | -Inf | 1.552e-04 | 0.532
performance::check_model(Flu2019_SVI_log, panel = TRUE)
Variable `Component` is not in your data frame :/

# Margins
cplot(Flu2019_SVI_log, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given SVI")

Flu 2019 with SVI as Quadratic
Flu2019_SVI_quad <- glm(flu_2019 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
relig_affil + mstat_5 + lang_3 + act_tob + max_ch + IC + insurance
+ pop_dens + I(RPL_THEMES^2),
family = "binomial",
data = flu_clean1)
summary(Flu2019_SVI_quad )
Call:
glm(formula = flu_2019 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + relig_affil + mstat_5 + lang_3 + act_tob + max_ch +
IC + insurance + pop_dens + I(RPL_THEMES^2), family = "binomial",
data = flu_clean1)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.873 -1.091 -0.764 1.145 2.171
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.285e-01 2.383e-01 2.637 0.008365 **
ibd_3UC 1.412e-02 5.508e-02 0.256 0.797672
ibd_3Unknown -1.118e-02 4.838e-01 -0.023 0.981559
age_yrs -8.146e-03 2.095e-03 -3.888 0.000101 ***
genderFemale 1.588e-01 5.249e-02 3.025 0.002486 **
race_5Black -3.193e-01 1.136e-01 -2.811 0.004933 **
race_5Asian or Pacific Islander 6.497e-01 1.792e-01 3.626 0.000288 ***
race_5American Indian or Alaska Native 4.100e-02 4.295e-01 0.095 0.923946
race_5Other -1.416e-01 1.613e-01 -0.878 0.380182
ethnic_3Non-Hispanic -5.137e-01 1.981e-01 -2.593 0.009502 **
relig_affilNo -1.309e-01 5.376e-02 -2.435 0.014895 *
mstat_5Single -1.809e-01 6.718e-02 -2.692 0.007097 **
mstat_5Divorced/Separated 1.168e-01 1.385e-01 0.843 0.399101
mstat_5Widowed -3.105e-01 1.871e-01 -1.659 0.097049 .
lang_3Other 4.946e-02 3.159e-01 0.157 0.875592
act_tobYes -2.172e-01 8.557e-02 -2.538 0.011156 *
max_ch 2.734e-02 5.732e-03 4.769 1.85e-06 ***
IC 4.431e-01 5.911e-02 7.495 6.61e-14 ***
insuranceMedicaid -4.906e-01 8.134e-02 -6.032 1.62e-09 ***
insuranceMedicare -5.971e-01 8.226e-02 -7.258 3.92e-13 ***
insuranceOther Governmental -1.312e+00 3.793e-01 -3.458 0.000543 ***
insuranceOther 3.818e-01 3.788e-01 1.008 0.313447
pop_dens 5.407e-05 1.197e-05 4.517 6.28e-06 ***
I(RPL_THEMES^2) -7.836e-01 1.292e-01 -6.064 1.33e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8886.3 on 6443 degrees of freedom
Residual deviance: 8493.3 on 6420 degrees of freedom
(4606 observations deleted due to missingness)
AIC: 8541.3
Number of Fisher Scoring iterations: 4
broom::glance(Flu2019_SVI_quad )
broom::tidy(Flu2019_SVI_quad , exponentiate = TRUE)
tbl_regression(Flu2019_SVI_quad, exponentiate = TRUE)
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.01 |
0.91, 1.13 |
0.8 |
| Â Â Â Â Unknown |
0.99 |
0.37, 2.53 |
>0.9 |
| Age |
0.99 |
0.99, 1.00 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.17 |
1.06, 1.30 |
0.002 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.73 |
0.58, 0.91 |
0.005 |
| Â Â Â Â Asian or Pacific Islander |
1.91 |
1.35, 2.74 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
1.04 |
0.44, 2.43 |
>0.9 |
| Â Â Â Â Other |
0.87 |
0.63, 1.19 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.60 |
0.40, 0.88 |
0.010 |
| Any Religious Affiliation |
|
|
|
| Â Â Â Â Yes |
— |
— |
|
| Â Â Â Â No |
0.88 |
0.79, 0.97 |
0.015 |
| Marital Status |
|
|
|
| Â Â Â Â Married |
— |
— |
|
| Â Â Â Â Single |
0.83 |
0.73, 0.95 |
0.007 |
| Â Â Â Â Divorced/Separated |
1.12 |
0.86, 1.47 |
0.4 |
| Â Â Â Â Widowed |
0.73 |
0.50, 1.05 |
0.10 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.05 |
0.56, 1.95 |
0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.80 |
0.68, 0.95 |
0.011 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.04 |
<0.001 |
| Immunocompromised |
1.56 |
1.39, 1.75 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.61 |
0.52, 0.72 |
<0.001 |
| Â Â Â Â Medicare |
0.55 |
0.47, 0.65 |
<0.001 |
| Â Â Â Â Other Governmental |
0.27 |
0.12, 0.54 |
<0.001 |
| Â Â Â Â Other |
1.46 |
0.70, 3.16 |
0.3 |
| Population Density of Census Tract |
1.00 |
1.00, 1.00 |
<0.001 |
| Social Vulnerability Index |
0.46 |
0.35, 0.59 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Flu2019_SVI_quad)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 8.25476
degrees of freedom = 9
p-value = 0.50869
# C-Statistic/AUROC
Cstat(Flu2019_SVI_quad)
[1] 0.6408574
# Model performance
model_performance(Flu2019_SVI_quad)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
8561.720 | 8561.907 | 8724.221 | 0.059 | 0.483 | 1.150 | 0.659 | -Inf | 1.552e-04 | 0.533
performance::check_model(Flu2019_SVI_quad, panel = TRUE)
Variable `Component` is not in your data frame :/

# Margins
cplot(Flu2019_SVI_quad, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given SVI")

Flu 2019 with SVI as Quartile
Flu2019_SVI_quart <- glm(flu_2019 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
relig_affil + mstat_5 + lang_3 + act_tob + max_ch + IC + insurance
+ pop_dens + RPL_4,
family = "binomial",
data = flu_clean1)
summary(Flu2019_SVI_quart )
Call:
glm(formula = flu_2019 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + relig_affil + mstat_5 + lang_3 + act_tob + max_ch +
IC + insurance + pop_dens + RPL_4, family = "binomial", data = flu_clean1)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8519 -1.0878 -0.7654 1.1467 2.1766
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.315e-01 2.387e-01 2.646 0.008156 **
ibd_3UC 1.421e-02 5.509e-02 0.258 0.796382
ibd_3Unknown -2.033e-02 4.842e-01 -0.042 0.966511
age_yrs -8.117e-03 2.095e-03 -3.874 0.000107 ***
genderFemale 1.605e-01 5.250e-02 3.057 0.002239 **
race_5Black -3.479e-01 1.131e-01 -3.075 0.002103 **
race_5Asian or Pacific Islander 6.614e-01 1.794e-01 3.687 0.000227 ***
race_5American Indian or Alaska Native 3.377e-02 4.299e-01 0.079 0.937396
race_5Other -1.480e-01 1.613e-01 -0.918 0.358854
ethnic_3Non-Hispanic -5.011e-01 1.978e-01 -2.534 0.011289 *
relig_affilNo -1.304e-01 5.377e-02 -2.426 0.015266 *
mstat_5Single -1.808e-01 6.720e-02 -2.690 0.007153 **
mstat_5Divorced/Separated 1.181e-01 1.386e-01 0.852 0.394109
mstat_5Widowed -3.132e-01 1.871e-01 -1.674 0.094046 .
lang_3Other 3.797e-02 3.163e-01 0.120 0.904446
act_tobYes -2.169e-01 8.557e-02 -2.535 0.011242 *
max_ch 2.750e-02 5.733e-03 4.796 1.62e-06 ***
IC 4.399e-01 5.910e-02 7.443 9.84e-14 ***
insuranceMedicaid -4.914e-01 8.133e-02 -6.042 1.52e-09 ***
insuranceMedicare -6.000e-01 8.220e-02 -7.299 2.90e-13 ***
insuranceOther Governmental -1.301e+00 3.790e-01 -3.434 0.000595 ***
insuranceOther 3.970e-01 3.786e-01 1.049 0.294383
pop_dens 5.304e-05 1.194e-05 4.441 8.95e-06 ***
RPL_4Second -1.492e-01 6.126e-02 -2.436 0.014854 *
RPL_4Third -3.617e-01 7.391e-02 -4.894 9.89e-07 ***
RPL_4Fourth -5.104e-01 1.054e-01 -4.843 1.28e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8886.3 on 6443 degrees of freedom
Residual deviance: 8492.7 on 6418 degrees of freedom
(4606 observations deleted due to missingness)
AIC: 8544.7
Number of Fisher Scoring iterations: 4
broom::glance(Flu2019_SVI_quart )
broom::tidy(Flu2019_SVI_quart , exponentiate = TRUE)
tbl_regression(Flu2019_SVI_quart, exponentiate = TRUE)
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.01 |
0.91, 1.13 |
0.8 |
| Â Â Â Â Unknown |
0.98 |
0.37, 2.51 |
>0.9 |
| Age |
0.99 |
0.99, 1.00 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.17 |
1.06, 1.30 |
0.002 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.71 |
0.56, 0.88 |
0.002 |
| Â Â Â Â Asian or Pacific Islander |
1.94 |
1.37, 2.77 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
1.03 |
0.44, 2.41 |
>0.9 |
| Â Â Â Â Other |
0.86 |
0.63, 1.18 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.61 |
0.41, 0.89 |
0.011 |
| Any Religious Affiliation |
|
|
|
| Â Â Â Â Yes |
— |
— |
|
| Â Â Â Â No |
0.88 |
0.79, 0.98 |
0.015 |
| Marital Status |
|
|
|
| Â Â Â Â Married |
— |
— |
|
| Â Â Â Â Single |
0.83 |
0.73, 0.95 |
0.007 |
| Â Â Â Â Divorced/Separated |
1.13 |
0.86, 1.48 |
0.4 |
| Â Â Â Â Widowed |
0.73 |
0.50, 1.05 |
0.094 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.04 |
0.55, 1.93 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.80 |
0.68, 0.95 |
0.011 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.04 |
<0.001 |
| Immunocompromised |
1.55 |
1.38, 1.74 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.61 |
0.52, 0.72 |
<0.001 |
| Â Â Â Â Medicare |
0.55 |
0.47, 0.64 |
<0.001 |
| Â Â Â Â Other Governmental |
0.27 |
0.12, 0.55 |
<0.001 |
| Â Â Â Â Other |
1.49 |
0.72, 3.20 |
0.3 |
| Population Density of Census Tract |
1.00 |
1.00, 1.00 |
<0.001 |
| SVI by Quartile |
|
|
|
| Â Â Â Â First |
— |
— |
|
| Â Â Â Â Second |
0.86 |
0.76, 0.97 |
0.015 |
| Â Â Â Â Third |
0.70 |
0.60, 0.80 |
<0.001 |
| Â Â Â Â Fourth |
0.60 |
0.49, 0.74 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Flu2019_SVI_quart)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 9.34888
degrees of freedom = 9
p-value = 0.40571
# C-Statistic/AUROC
Cstat(Flu2019_SVI_quart)
[1] 0.6410718
# Model performance
model_performance(Flu2019_SVI_quart)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
8544.655 | 8544.873 | 8720.698 | 0.059 | 0.483 | 1.150 | 0.659 | -Inf | 1.552e-04 | 0.533
performance::check_model(Flu2019_SVI_quart, panel = TRUE)
Variable `Component` is not in your data frame :/

# Margins
cplot(Flu2019_SVI_quart, "RPL_4", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given SVI")

NA
NA
Flu 2019 + All SVI Themes
Flu2019_all_themes <- glm(flu_2019 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
lang_3 + mstat_5 + relig_affil + act_tob + max_ch + IC
+ pop_dens + RPL_THEME1 + RPL_THEME2 + RPL_THEME3
+ RPL_THEME4,
family = "binomial",
data = flu_clean1)
summary(Flu2019_all_themes )
Call:
glm(formula = flu_2019 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + mstat_5 + relig_affil + act_tob + max_ch +
IC + pop_dens + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial", data = flu_clean1)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8416 -1.0867 -0.8063 1.1709 2.0183
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 9.257e-01 2.434e-01 3.803 0.000143 ***
ibd_3UC 3.209e-02 5.498e-02 0.584 0.559448
ibd_3Unknown -3.204e-04 4.769e-01 -0.001 0.999464
age_yrs -1.324e-02 1.906e-03 -6.944 3.81e-12 ***
genderFemale 1.558e-01 5.242e-02 2.972 0.002956 **
race_5Black -3.849e-01 1.139e-01 -3.380 0.000725 ***
race_5Asian or Pacific Islander 6.068e-01 1.821e-01 3.333 0.000860 ***
race_5American Indian or Alaska Native -2.720e-02 4.286e-01 -0.063 0.949400
race_5Other -2.225e-01 1.612e-01 -1.381 0.167343
ethnic_3Non-Hispanic -5.010e-01 1.977e-01 -2.534 0.011284 *
lang_3Other -2.145e-01 3.113e-01 -0.689 0.490704
mstat_5Single -3.076e-01 6.581e-02 -4.674 2.95e-06 ***
mstat_5Divorced/Separated 1.052e-02 1.370e-01 0.077 0.938835
mstat_5Widowed -4.264e-01 1.858e-01 -2.295 0.021710 *
relig_affilNo -1.293e-01 5.380e-02 -2.403 0.016243 *
act_tobYes -2.542e-01 8.483e-02 -2.996 0.002732 **
max_ch 2.188e-02 5.676e-03 3.855 0.000116 ***
IC 4.728e-01 5.918e-02 7.989 1.36e-15 ***
pop_dens 4.564e-05 1.319e-05 3.459 0.000543 ***
RPL_THEME1 -6.516e-01 1.598e-01 -4.079 4.52e-05 ***
RPL_THEME2 -5.544e-01 1.382e-01 -4.013 6.00e-05 ***
RPL_THEME3 1.050e-01 9.959e-02 1.054 0.291726
RPL_THEME4 1.331e-01 1.102e-01 1.208 0.226863
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8818.9 on 6396 degrees of freedom
Residual deviance: 8483.0 on 6374 degrees of freedom
(4653 observations deleted due to missingness)
AIC: 8529
Number of Fisher Scoring iterations: 4
broom::glance(Flu2019_all_themes )
broom::tidy(Flu2019_all_themes , exponentiate = TRUE)
tbl_regression(Flu2019_all_themes, exponentiate = TRUE)
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.03 |
0.93, 1.15 |
0.6 |
| Â Â Â Â Unknown |
1.00 |
0.38, 2.53 |
>0.9 |
| Age |
0.99 |
0.98, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.17 |
1.05, 1.30 |
0.003 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.68 |
0.54, 0.85 |
<0.001 |
| Â Â Â Â Asian or Pacific Islander |
1.83 |
1.29, 2.64 |
<0.001 |
| Â Â Â Â American Indian or Alaska Native |
0.97 |
0.41, 2.27 |
>0.9 |
| Â Â Â Â Other |
0.80 |
0.58, 1.10 |
0.2 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.61 |
0.41, 0.89 |
0.011 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.81 |
0.43, 1.48 |
0.5 |
| Marital Status |
|
|
|
| Â Â Â Â Married |
— |
— |
|
| Â Â Â Â Single |
0.74 |
0.65, 0.84 |
<0.001 |
| Â Â Â Â Divorced/Separated |
1.01 |
0.77, 1.32 |
>0.9 |
| Â Â Â Â Widowed |
0.65 |
0.45, 0.93 |
0.022 |
| Any Religious Affiliation |
|
|
|
| Â Â Â Â Yes |
— |
— |
|
| Â Â Â Â No |
0.88 |
0.79, 0.98 |
0.016 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.78 |
0.66, 0.92 |
0.003 |
| Charlson Comorbidity Index |
1.02 |
1.01, 1.03 |
<0.001 |
| Immunocompromised |
1.60 |
1.43, 1.80 |
<0.001 |
| Population Density of Census Tract |
1.00 |
1.00, 1.00 |
<0.001 |
| Socioeconomic Status |
0.52 |
0.38, 0.71 |
<0.001 |
| Household Composition |
0.57 |
0.44, 0.75 |
<0.001 |
| Minority and Language Status |
1.11 |
0.91, 1.35 |
0.3 |
| Housing and Transportation |
1.14 |
0.92, 1.42 |
0.2 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Flu2019_all_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 8.31806
degrees of freedom = 8
p-value = 0.40303
# C-Statistic/AUROC
Cstat(Flu2019_all_themes)
[1] 0.6315944
# Model performance
model_performance(Flu2019_all_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | PCP
-----------------------------------------------------------------------------------------
8528.954 | 8529.127 | 8684.516 | 0.051 | 0.485 | 1.154 | 0.663 | -Inf | 0.529
performance::check_model(Flu2019_all_themes, panel = TRUE)
Variable `Component` is not in your data frame :/

# Margins
cplot(Flu2019_all_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given THEME1")

cplot(Flu2019_all_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given THEME2")

cplot(Flu2019_all_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given THEME3")

cplot(Flu2019_all_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Flu Vaccine Given THEME4")

LS0tCnRpdGxlOiAiRmx1IDIwMTkgTW9kZWxzIgpvdXRwdXQ6CiAgaHRtbF9ub3RlYm9vazoKICAgIHRoZW1lczogcGFwZXIKICAgIHRvYzogeWVzCiAgICB0b2NfZmxvYXQ6IHllcwplZGl0b3Jfb3B0aW9uczoKICBjaHVua19vdXRwdXRfdHlwZTogaW5saW5lCmRhdGU6ICIyMDIzLTAxLTA2IgotLS0KIyBMb2FkIFBhY2thZ2VzIApgYGB7cn0KbGlicmFyeSh0aWR5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