Multivariable Models: All Biologics
All biologics rx + total SVI
med_data_ALL$biologic_2 <- as.numeric(med_data_ALL$biologic_2)
Biologic_Rx <- glm(biologic_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + max_ch + act_tob + insurance +
RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(Biologic_Rx )
Call:
glm(formula = biologic_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + max_ch + act_tob + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1606 -0.9798 0.5237 0.9526 2.3693
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.469846 0.190220 12.984 < 2e-16 ***
ibd_3UC -1.411138 0.047408 -29.766 < 2e-16 ***
ibd_3IC -11.744213 112.672158 -0.104 0.91698
ibd_3Unknown -2.012439 0.393335 -5.116 3.12e-07 ***
age_yrs -0.030102 0.001581 -19.040 < 2e-16 ***
genderFemale -0.205195 0.046923 -4.373 1.23e-05 ***
race_5Black 0.081423 0.096535 0.843 0.39898
race_5Asian or Pacific Islander -0.291076 0.148418 -1.961 0.04986 *
race_5American Indian or Alaska Native -0.466911 0.371267 -1.258 0.20853
race_5Other 0.115467 0.140517 0.822 0.41123
ethnic_3Non-Hispanic 0.014178 0.171705 0.083 0.93419
lang_3Other -0.497252 0.260523 -1.909 0.05630 .
max_ch -0.031940 0.005281 -6.048 1.47e-09 ***
act_tobYes -0.095063 0.073681 -1.290 0.19698
insuranceMedicaid -0.207576 0.069410 -2.991 0.00278 **
insuranceMedicare -0.173809 0.073400 -2.368 0.01789 *
insuranceOther Governmental -0.379562 0.281841 -1.347 0.17807
insuranceOther -0.215823 0.342317 -0.630 0.52838
RPL_THEMES 0.100837 0.096881 1.041 0.29795
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12932 on 9335 degrees of freedom
Residual deviance: 10860 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 10898
Number of Fisher Scoring iterations: 10
broom::glance(Biologic_Rx )
broom::tidy(Biologic_Rx , exponentiate = TRUE)
tbl_regression(Biologic_Rx, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.24 |
0.22, 0.27 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.13 |
0.06, 0.28 |
<0.001 |
| Age |
0.97 |
0.97, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.81 |
0.74, 0.89 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.08 |
0.90, 1.31 |
0.4 |
| Â Â Â Â Asian or Pacific Islander |
0.75 |
0.56, 1.00 |
0.050 |
| Â Â Â Â American Indian or Alaska Native |
0.63 |
0.30, 1.29 |
0.2 |
| Â Â Â Â Other |
1.12 |
0.85, 1.48 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.01 |
0.72, 1.42 |
>0.9 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.61 |
0.36, 1.01 |
0.056 |
| Charlson Comorbidity Index |
0.97 |
0.96, 0.98 |
<0.001 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.91 |
0.79, 1.05 |
0.2 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.81 |
0.71, 0.93 |
0.003 |
| Â Â Â Â Medicare |
0.84 |
0.73, 0.97 |
0.018 |
| Â Â Â Â Other Governmental |
0.68 |
0.39, 1.19 |
0.2 |
| Â Â Â Â Other |
0.81 |
0.41, 1.58 |
0.5 |
| Social Vulnerability Index |
1.11 |
0.91, 1.34 |
0.3 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Biologic_Rx)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 25.88402
degrees of freedom = 8
p-value = 0.0010994
# C-Statistic/AUROC
Cstat(Biologic_Rx)
[1] 0.7613488
# Model performance
model_performance(Biologic_Rx)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
--------------------------------------------------------------------------------------------------------------
10897.829 | 10897.910 | 11033.520 | 0.205 | 0.446 | 1.080 | 0.582 | -Inf | 1.855e-04 | 0.603
performance::check_model(Biologic_Rx)
Variable `Component` is not in your data frame :/

# Margins
margins(Biologic_Rx)
Average marginal effects
glm(formula = biologic_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + max_ch + act_tob + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(Biologic_Rx, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Biologic Rx Given SVI")

All biologics rx + SVI Sub-themes
Biologic_Rx_themes <- glm(biologic_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = baseline_rx)
summary(Biologic_Rx_themes )
Call:
glm(formula = biologic_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = baseline_rx)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1378 -0.9793 0.5196 0.9486 2.3786
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.479185 0.197765 12.536 < 2e-16 ***
ibd_3UC -1.404335 0.047552 -29.532 < 2e-16 ***
ibd_3IC -11.836091 111.683431 -0.106 0.91560
ibd_3Unknown -2.017824 0.393359 -5.130 2.90e-07 ***
age_yrs -0.030235 0.001589 -19.032 < 2e-16 ***
genderFemale -0.199303 0.047068 -4.234 2.29e-05 ***
race_5Black 0.061163 0.098369 0.622 0.53410
race_5Asian or Pacific Islander -0.264670 0.150561 -1.758 0.07876 .
race_5American Indian or Alaska Native -0.454421 0.373090 -1.218 0.22323
race_5Other 0.126083 0.141465 0.891 0.37279
ethnic_3Non-Hispanic 0.029251 0.172263 0.170 0.86517
lang_3Other -0.488521 0.261805 -1.866 0.06204 .
act_tobYes -0.103796 0.073933 -1.404 0.16035
max_ch -0.031935 0.005305 -6.020 1.74e-09 ***
insuranceMedicaid -0.223899 0.069798 -3.208 0.00134 **
insuranceMedicare -0.175845 0.073611 -2.389 0.01690 *
insuranceOther Governmental -0.385676 0.281953 -1.368 0.17135
insuranceOther -0.227612 0.340914 -0.668 0.50436
RPL_THEME1 0.279617 0.136677 2.046 0.04077 *
RPL_THEME2 0.119268 0.117451 1.015 0.30988
RPL_THEME3 0.015169 0.086000 0.176 0.85999
RPL_THEME4 -0.299314 0.098486 -3.039 0.00237 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12855 on 9280 degrees of freedom
Residual deviance: 10794 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 10838
Number of Fisher Scoring iterations: 10
broom::glance(Biologic_Rx_themes )
broom::tidy(Biologic_Rx_themes , exponentiate = TRUE)
tbl_regression(Biologic_Rx_themes, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.25 |
0.22, 0.27 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.13 |
0.06, 0.28 |
<0.001 |
| Age |
0.97 |
0.97, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.82 |
0.75, 0.90 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.06 |
0.88, 1.29 |
0.5 |
| Â Â Â Â Asian or Pacific Islander |
0.77 |
0.57, 1.03 |
0.079 |
| Â Â Â Â American Indian or Alaska Native |
0.63 |
0.30, 1.31 |
0.2 |
| Â Â Â Â Other |
1.13 |
0.86, 1.50 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.03 |
0.73, 1.44 |
0.9 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.61 |
0.36, 1.02 |
0.062 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.90 |
0.78, 1.04 |
0.2 |
| Charlson Comorbidity Index |
0.97 |
0.96, 0.98 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.80 |
0.70, 0.92 |
0.001 |
| Â Â Â Â Medicare |
0.84 |
0.73, 0.97 |
0.017 |
| Â Â Â Â Other Governmental |
0.68 |
0.39, 1.18 |
0.2 |
| Â Â Â Â Other |
0.80 |
0.41, 1.56 |
0.5 |
| Socioeconomic Status |
1.32 |
1.01, 1.73 |
0.041 |
| Household Composition |
1.13 |
0.89, 1.42 |
0.3 |
| Minority and Language Status |
1.02 |
0.86, 1.20 |
0.9 |
| Housing and Transportation |
0.74 |
0.61, 0.90 |
0.002 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Biologic_Rx_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 26.64642
degrees of freedom = 8
p-value = 0.00081352
# C-Statistic/AUROC
Cstat(Biologic_Rx_themes)
[1] 0.7613045
# Model performance
model_performance(Biologic_Rx_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
--------------------------------------------------------------------------------------------------------------
10838.330 | 10838.439 | 10995.316 | 0.205 | 0.446 | 1.080 | 0.582 | -Inf | 1.866e-04 | 0.603
performance::check_model(Biologic_Rx_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(Biologic_Rx_themes)
Average marginal effects
glm(formula = biologic_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = baseline_rx)
cplot(Biologic_Rx_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Biologic Rx Given Theme1")

cplot(Biologic_Rx_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Biologic Rx Given Theme2")

cplot(Biologic_Rx_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Biologic Rx Given Theme3")

cplot(Biologic_Rx_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Biologic Rx Given Theme4")

Sustained biologic access + total SVI
Biologic_access <- glm(biologic_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance +
RPL_THEMES,
family = "binomial",
data = baseline_access)
summary(Biologic_access )
Call:
glm(formula = biologic_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = baseline_access)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.9713 -0.9302 -0.5525 0.9986 2.4150
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.007684 0.186298 10.777 < 2e-16 ***
ibd_3UC -1.212042 0.047580 -25.474 < 2e-16 ***
ibd_3IC -11.099191 113.048307 -0.098 0.92179
ibd_3Unknown -2.109528 0.489003 -4.314 1.6e-05 ***
age_yrs -0.031683 0.001584 -20.006 < 2e-16 ***
genderFemale -0.202418 0.046769 -4.328 1.5e-05 ***
race_5Black 0.236082 0.094050 2.510 0.01207 *
race_5Asian or Pacific Islander -0.133923 0.149451 -0.896 0.37020
race_5American Indian or Alaska Native -0.187310 0.378536 -0.495 0.62072
race_5Other 0.046747 0.139644 0.335 0.73781
ethnic_3Non-Hispanic -0.093921 0.169262 -0.555 0.57897
lang_3Other -0.060331 0.262359 -0.230 0.81813
act_tobYes -0.030105 0.072673 -0.414 0.67869
max_ch -0.014508 0.005528 -2.624 0.00869 **
insuranceMedicaid -0.150658 0.067678 -2.226 0.02601 *
insuranceMedicare -0.206507 0.077513 -2.664 0.00772 **
insuranceOther Governmental -0.923689 0.314055 -2.941 0.00327 **
insuranceOther -0.116602 0.344196 -0.339 0.73479
RPL_THEMES -0.145948 0.096706 -1.509 0.13125
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12608 on 9335 degrees of freedom
Residual deviance: 10859 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 10897
Number of Fisher Scoring iterations: 10
broom::glance(Biologic_access )
broom::tidy(Biologic_access , exponentiate = TRUE)
tbl_regression(Biologic_access, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.30 |
0.27, 0.33 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.12 |
0.04, 0.29 |
<0.001 |
| Age |
0.97 |
0.97, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.82 |
0.75, 0.90 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.27 |
1.05, 1.52 |
0.012 |
| Â Â Â Â Asian or Pacific Islander |
0.87 |
0.65, 1.17 |
0.4 |
| Â Â Â Â American Indian or Alaska Native |
0.83 |
0.38, 1.71 |
0.6 |
| Â Â Â Â Other |
1.05 |
0.80, 1.38 |
0.7 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.91 |
0.65, 1.27 |
0.6 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.94 |
0.56, 1.56 |
0.8 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.97 |
0.84, 1.12 |
0.7 |
| Charlson Comorbidity Index |
0.99 |
0.97, 1.00 |
0.009 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.86 |
0.75, 0.98 |
0.026 |
| Â Â Â Â Medicare |
0.81 |
0.70, 0.95 |
0.008 |
| Â Â Â Â Other Governmental |
0.40 |
0.21, 0.72 |
0.003 |
| Â Â Â Â Other |
0.89 |
0.45, 1.73 |
0.7 |
| Social Vulnerability Index |
0.86 |
0.71, 1.04 |
0.13 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Biologic_access)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 19.65163
degrees of freedom = 8
p-value = 0.011738
# C-Statistic/AUROC
Cstat(Biologic_access)
[1] 0.7448826
# Model performance
model_performance(Biologic_access)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
--------------------------------------------------------------------------------------------------------------
10896.635 | 10896.717 | 11032.326 | 0.176 | 0.446 | 1.080 | 0.582 | -Inf | 1.855e-04 | 0.603
performance::check_model(Biologic_access)
Variable `Component` is not in your data frame :/

# Margins
margins(Biologic_access)
Average marginal effects
glm(formula = biologic_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = baseline_access)
cplot(Biologic_access, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Biologic Access Given SVI")

Sustained biologic access + SVI subthemes
Biologic_access_themes <- glm(biologic_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance +
RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = baseline_access)
summary(Biologic_access_themes )
Call:
glm(formula = biologic_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = baseline_access)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.9203 -0.9325 -0.5516 1.0000 2.4067
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.961377 0.194493 10.085 < 2e-16 ***
ibd_3UC -1.206933 0.047755 -25.274 < 2e-16 ***
ibd_3IC -11.209815 111.911054 -0.100 0.92021
ibd_3Unknown -2.114952 0.489044 -4.325 1.53e-05 ***
age_yrs -0.031729 0.001591 -19.943 < 2e-16 ***
genderFemale -0.198918 0.046932 -4.238 2.25e-05 ***
race_5Black 0.168200 0.095670 1.758 0.07873 .
race_5Asian or Pacific Islander -0.180190 0.151574 -1.189 0.23452
race_5American Indian or Alaska Native -0.169791 0.379755 -0.447 0.65480
race_5Other 0.018490 0.140838 0.131 0.89555
ethnic_3Non-Hispanic -0.066150 0.170435 -0.388 0.69792
lang_3Other -0.100889 0.263361 -0.383 0.70166
act_tobYes -0.035134 0.072963 -0.482 0.63014
max_ch -0.014355 0.005555 -2.584 0.00976 **
insuranceMedicaid -0.158228 0.068112 -2.323 0.02018 *
insuranceMedicare -0.201959 0.077741 -2.598 0.00938 **
insuranceOther Governmental -0.922529 0.314067 -2.937 0.00331 **
insuranceOther -0.118720 0.342934 -0.346 0.72920
RPL_THEME1 0.172607 0.136217 1.267 0.20510
RPL_THEME2 -0.045215 0.117038 -0.386 0.69925
RPL_THEME3 0.198292 0.085874 2.309 0.02094 *
RPL_THEME4 -0.380869 0.098457 -3.868 0.00011 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 12538 on 9280 degrees of freedom
Residual deviance: 10788 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 10832
Number of Fisher Scoring iterations: 10
broom::glance(Biologic_access_themes )
broom::tidy(Biologic_access_themes , exponentiate = TRUE)
tbl_regression(Biologic_access_themes, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.30 |
0.27, 0.33 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.12 |
0.04, 0.29 |
<0.001 |
| Age |
0.97 |
0.97, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.82 |
0.75, 0.90 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.18 |
0.98, 1.43 |
0.079 |
| Â Â Â Â Asian or Pacific Islander |
0.84 |
0.62, 1.12 |
0.2 |
| Â Â Â Â American Indian or Alaska Native |
0.84 |
0.39, 1.75 |
0.7 |
| Â Â Â Â Other |
1.02 |
0.77, 1.34 |
0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.94 |
0.67, 1.31 |
0.7 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.90 |
0.53, 1.50 |
0.7 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.97 |
0.84, 1.11 |
0.6 |
| Charlson Comorbidity Index |
0.99 |
0.98, 1.00 |
0.010 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.85 |
0.75, 0.98 |
0.020 |
| Â Â Â Â Medicare |
0.82 |
0.70, 0.95 |
0.009 |
| Â Â Â Â Other Governmental |
0.40 |
0.21, 0.72 |
0.003 |
| Â Â Â Â Other |
0.89 |
0.45, 1.73 |
0.7 |
| Socioeconomic Status |
1.19 |
0.91, 1.55 |
0.2 |
| Household Composition |
0.96 |
0.76, 1.20 |
0.7 |
| Minority and Language Status |
1.22 |
1.03, 1.44 |
0.021 |
| Housing and Transportation |
0.68 |
0.56, 0.83 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(Biologic_access_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 17.94794
degrees of freedom = 8
p-value = 0.02162
# C-Statistic/AUROC
Cstat(Biologic_access_themes)
[1] 0.7454907
# Model performance
model_performance(Biologic_access_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
--------------------------------------------------------------------------------------------------------------
10831.803 | 10831.912 | 10988.788 | 0.177 | 0.445 | 1.079 | 0.581 | -Inf | 1.866e-04 | 0.603
performance::check_model(Biologic_access_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(Biologic_access_themes)
Average marginal effects
glm(formula = biologic_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = baseline_access)
cplot(Biologic_access_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Biologic Access Given Theme1")

cplot(Biologic_access_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Biologic Access Given Theme2")

cplot(Biologic_access_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Biologic Access Given Theme3")

cplot(Biologic_access_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Biologic Access Given Theme4")

Infliximab
Infliximab rx + SVI
med_data_ALL$infliximab_2 <- as.numeric(med_data_ALL$infliximab_2)
infliximab_rx <- glm(infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(infliximab_rx )
Call:
glm(formula = infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.5449 -0.7921 -0.5445 0.9865 2.6734
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.156921 0.193428 5.981 2.22e-09 ***
ibd_3UC -0.750295 0.052163 -14.384 < 2e-16 ***
ibd_3IC -11.146436 184.775132 -0.060 0.95190
ibd_3Unknown -1.756721 0.610687 -2.877 0.00402 **
age_yrs -0.034985 0.001747 -20.029 < 2e-16 ***
genderFemale -0.239451 0.050607 -4.732 2.23e-06 ***
race_5Black 0.209797 0.098403 2.132 0.03300 *
race_5Asian or Pacific Islander -0.280544 0.167680 -1.673 0.09431 .
race_5American Indian or Alaska Native -0.267798 0.439184 -0.610 0.54202
race_5Other -0.006219 0.149854 -0.042 0.96689
ethnic_3Non-Hispanic -0.105894 0.177156 -0.598 0.55001
lang_3Other -0.322780 0.310029 -1.041 0.29782
act_tobYes 0.031405 0.077736 0.404 0.68622
max_ch -0.021531 0.006638 -3.244 0.00118 **
insuranceMedicaid 0.025233 0.070767 0.357 0.72142
insuranceMedicare 0.045401 0.091691 0.495 0.62049
insuranceOther Governmental -0.344897 0.332071 -1.039 0.29898
insuranceOther 0.085770 0.364569 0.235 0.81400
RPL_THEMES -0.114778 0.104739 -1.096 0.27314
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 10701.5 on 9335 degrees of freedom
Residual deviance: 9534.9 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 9572.9
Number of Fisher Scoring iterations: 11
broom::glance(infliximab_rx )
broom::tidy(infliximab_rx , exponentiate = TRUE)
tbl_regression(infliximab_rx, 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 occurredWarning: collapsing to unique 'x' values
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.47 |
0.43, 0.52 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.17 |
0.04, 0.49 |
0.004 |
| Age |
0.97 |
0.96, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.79 |
0.71, 0.87 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.23 |
1.02, 1.49 |
0.033 |
| Â Â Â Â Asian or Pacific Islander |
0.76 |
0.54, 1.04 |
0.094 |
| Â Â Â Â American Indian or Alaska Native |
0.77 |
0.30, 1.72 |
0.5 |
| Â Â Â Â Other |
0.99 |
0.74, 1.33 |
>0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.90 |
0.64, 1.28 |
0.6 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.72 |
0.38, 1.30 |
0.3 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.03 |
0.89, 1.20 |
0.7 |
| Charlson Comorbidity Index |
0.98 |
0.97, 0.99 |
0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.03 |
0.89, 1.18 |
0.7 |
| Â Â Â Â Medicare |
1.05 |
0.87, 1.25 |
0.6 |
| Â Â Â Â Other Governmental |
0.71 |
0.36, 1.32 |
0.3 |
| Â Â Â Â Other |
1.09 |
0.52, 2.17 |
0.8 |
| Social Vulnerability Index |
0.89 |
0.73, 1.09 |
0.3 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(infliximab_rx)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 55.16581
degrees of freedom = 8
p-value = 4.0991e-09
# C-Statistic/AUROC
Cstat(infliximab_rx)
[1] 0.7223022
# Model performance
model_performance(infliximab_rx)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
9572.877 | 9572.958 | 9708.568 | 0.126 | 0.409 | 1.012 | 0.511 | -Inf | 1.855e-04 | 0.664
performance::check_model(infliximab_rx)
Variable `Component` is not in your data frame :/

# Margins
margins(infliximab_rx)
Average marginal effects
glm(formula = infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(infliximab_rx, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given SVI")

Infliximab rx + all themes
infliximab_rx_themes <- glm(infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(infliximab_rx_themes )
Call:
glm(formula = infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.5161 -0.7907 -0.5448 0.9814 2.7306
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.137415 0.203151 5.599 2.16e-08 ***
ibd_3UC -0.742092 0.052336 -14.179 < 2e-16 ***
ibd_3IC -11.266980 183.131059 -0.062 0.950942
ibd_3Unknown -1.756703 0.610803 -2.876 0.004027 **
age_yrs -0.035213 0.001754 -20.078 < 2e-16 ***
genderFemale -0.235028 0.050775 -4.629 3.68e-06 ***
race_5Black 0.172135 0.100175 1.718 0.085733 .
race_5Asian or Pacific Islander -0.291336 0.170035 -1.713 0.086641 .
race_5American Indian or Alaska Native -0.247858 0.439590 -0.564 0.572864
race_5Other -0.025801 0.151516 -0.170 0.864786
ethnic_3Non-Hispanic -0.078021 0.178864 -0.436 0.662689
lang_3Other -0.320327 0.311228 -1.029 0.303369
act_tobYes 0.031241 0.077986 0.401 0.688712
max_ch -0.021513 0.006669 -3.226 0.001255 **
insuranceMedicaid 0.015222 0.071302 0.213 0.830949
insuranceMedicare 0.047891 0.091939 0.521 0.602439
insuranceOther Governmental -0.339299 0.332270 -1.021 0.307182
insuranceOther 0.089704 0.363789 0.247 0.805232
RPL_THEME1 0.083093 0.147536 0.563 0.573295
RPL_THEME2 0.113148 0.126721 0.893 0.371913
RPL_THEME3 0.101195 0.093185 1.086 0.277500
RPL_THEME4 -0.375324 0.106729 -3.517 0.000437 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 10645.3 on 9280 degrees of freedom
Residual deviance: 9474.8 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 9518.8
Number of Fisher Scoring iterations: 11
broom::glance(infliximab_rx_themes )
broom::tidy(infliximab_rx_themes , exponentiate = TRUE)
tbl_regression(infliximab_rx_themes, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.48 |
0.43, 0.53 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.17 |
0.04, 0.49 |
0.004 |
| Age |
0.97 |
0.96, 0.97 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.79 |
0.72, 0.87 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.19 |
0.97, 1.44 |
0.086 |
| Â Â Â Â Asian or Pacific Islander |
0.75 |
0.53, 1.04 |
0.087 |
| Â Â Â Â American Indian or Alaska Native |
0.78 |
0.31, 1.75 |
0.6 |
| Â Â Â Â Other |
0.97 |
0.72, 1.31 |
0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.92 |
0.65, 1.32 |
0.7 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.73 |
0.38, 1.30 |
0.3 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.03 |
0.88, 1.20 |
0.7 |
| Charlson Comorbidity Index |
0.98 |
0.97, 0.99 |
0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.02 |
0.88, 1.17 |
0.8 |
| Â Â Â Â Medicare |
1.05 |
0.88, 1.25 |
0.6 |
| Â Â Â Â Other Governmental |
0.71 |
0.36, 1.33 |
0.3 |
| Â Â Â Â Other |
1.09 |
0.52, 2.18 |
0.8 |
| Socioeconomic Status |
1.09 |
0.81, 1.45 |
0.6 |
| Household Composition |
1.12 |
0.87, 1.44 |
0.4 |
| Minority and Language Status |
1.11 |
0.92, 1.33 |
0.3 |
| Housing and Transportation |
0.69 |
0.56, 0.85 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(infliximab_rx_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 50.01008
degrees of freedom = 8
p-value = 4.0686e-08
# C-Statistic/AUROC
Cstat(infliximab_rx_themes)
[1] 0.7232523
# Model performance
model_performance(infliximab_rx_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
9518.828 | 9518.937 | 9675.814 | 0.127 | 0.409 | 1.012 | 0.510 | -Inf | 1.866e-04 | 0.664
performance::check_model(infliximab_rx_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(infliximab_rx_themes)
Average marginal effects
glm(formula = infliximab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(infliximab_rx_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme1")

cplot(infliximab_rx_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme2")

cplot(infliximab_rx_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme3")

cplot(infliximab_rx_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme4")

Sustained infliximab access + SVI
med_data_ALL$infliximab_3 <- as.numeric(med_data_ALL$infliximab_3)
infliximab_access <- glm(infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(infliximab_access )
Call:
glm(formula = infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4960 -0.6783 -0.4557 -0.2729 2.9423
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.854496 0.213980 3.993 6.51e-05 ***
ibd_3UC -0.743339 0.059084 -12.581 < 2e-16 ***
ibd_3IC -10.438079 185.748780 -0.056 0.955187
ibd_3Unknown -2.451395 1.021088 -2.401 0.016361 *
age_yrs -0.041138 0.002004 -20.528 < 2e-16 ***
genderFemale -0.278958 0.056565 -4.932 8.15e-07 ***
race_5Black 0.396415 0.106471 3.723 0.000197 ***
race_5Asian or Pacific Islander -0.029172 0.176820 -0.165 0.868960
race_5American Indian or Alaska Native -0.176159 0.501028 -0.352 0.725142
race_5Other 0.182818 0.160986 1.136 0.256119
ethnic_3Non-Hispanic 0.064906 0.197183 0.329 0.742030
lang_3Other -0.003557 0.325393 -0.011 0.991278
act_tobYes -0.013089 0.087462 -0.150 0.881040
max_ch -0.006488 0.007687 -0.844 0.398653
insuranceMedicaid 0.070859 0.077209 0.918 0.358743
insuranceMedicare -0.050001 0.112622 -0.444 0.657064
insuranceOther Governmental -0.707125 0.422070 -1.675 0.093861 .
insuranceOther -0.065264 0.418810 -0.156 0.876165
RPL_THEMES -0.447728 0.118341 -3.783 0.000155 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 9076.3 on 9335 degrees of freedom
Residual deviance: 7958.0 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 7996
Number of Fisher Scoring iterations: 11
broom::glance(infliximab_access )
broom::tidy(infliximab_access , exponentiate = TRUE)
tbl_regression(infliximab_access, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurred
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.48 |
0.42, 0.53 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.09 |
0.00, 0.41 |
0.016 |
| Age |
0.96 |
0.96, 0.96 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.76 |
0.68, 0.85 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.49 |
1.20, 1.83 |
<0.001 |
| Â Â Â Â Asian or Pacific Islander |
0.97 |
0.68, 1.36 |
0.9 |
| Â Â Â Â American Indian or Alaska Native |
0.84 |
0.28, 2.06 |
0.7 |
| Â Â Â Â Other |
1.20 |
0.87, 1.64 |
0.3 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.07 |
0.73, 1.59 |
0.7 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.00 |
0.51, 1.84 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.99 |
0.83, 1.17 |
0.9 |
| Charlson Comorbidity Index |
0.99 |
0.98, 1.01 |
0.4 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.07 |
0.92, 1.25 |
0.4 |
| Â Â Â Â Medicare |
0.95 |
0.76, 1.18 |
0.7 |
| Â Â Â Â Other Governmental |
0.49 |
0.20, 1.06 |
0.094 |
| Â Â Â Â Other |
0.94 |
0.39, 2.03 |
0.9 |
| Social Vulnerability Index |
0.64 |
0.51, 0.81 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(infliximab_access)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 47.93054
degrees of freedom = 8
p-value = 1.0186e-07
# C-Statistic/AUROC
Cstat(infliximab_access)
[1] 0.7407062
# Model performance
model_performance(infliximab_access)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
7995.964 | 7996.046 | 8131.655 | 0.127 | 0.365 | 0.924 | 0.426 | -Inf | 1.856e-04 | 0.731
performance::check_model(infliximab_access)
Variable `Component` is not in your data frame :/

# Margins
margins(infliximab_access)
Average marginal effects
glm(formula = infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(infliximab_access, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given SVI")

Sustained infliximab access + all themes
infliximab_acc_themes <- glm(infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(infliximab_acc_themes )
Call:
glm(formula = infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4096 -0.6745 -0.4557 -0.2708 2.9373
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.794373 0.226041 3.514 0.000441 ***
ibd_3UC -0.735563 0.059316 -12.401 < 2e-16 ***
ibd_3IC -10.585836 183.987870 -0.058 0.954119
ibd_3Unknown -2.445880 1.020756 -2.396 0.016568 *
age_yrs -0.041399 0.002013 -20.562 < 2e-16 ***
genderFemale -0.277561 0.056785 -4.888 1.02e-06 ***
race_5Black 0.322146 0.108271 2.975 0.002926 **
race_5Asian or Pacific Islander -0.098329 0.179747 -0.547 0.584350
race_5American Indian or Alaska Native -0.144954 0.500965 -0.289 0.772314
race_5Other 0.128948 0.163312 0.790 0.429775
ethnic_3Non-Hispanic 0.116395 0.200346 0.581 0.561262
lang_3Other -0.033887 0.326895 -0.104 0.917436
act_tobYes -0.010911 0.087826 -0.124 0.901126
max_ch -0.005981 0.007723 -0.774 0.438639
insuranceMedicaid 0.069134 0.077910 0.887 0.374884
insuranceMedicare -0.039940 0.112980 -0.354 0.723702
insuranceOther Governmental -0.690326 0.422612 -1.633 0.102369
insuranceOther -0.045845 0.417591 -0.110 0.912581
RPL_THEME1 -0.079757 0.165343 -0.482 0.629539
RPL_THEME2 -0.027731 0.142151 -0.195 0.845331
RPL_THEME3 0.230947 0.104331 2.214 0.026856 *
RPL_THEME4 -0.504636 0.119686 -4.216 2.48e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 9029.9 on 9280 degrees of freedom
Residual deviance: 7898.5 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 7942.5
Number of Fisher Scoring iterations: 11
broom::glance(infliximab_acc_themes )
broom::tidy(infliximab_acc_themes , exponentiate = TRUE)
tbl_regression(infliximab_acc_themes, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurred
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.48 |
0.43, 0.54 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.09 |
0.00, 0.41 |
0.017 |
| Age |
0.96 |
0.96, 0.96 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
0.76 |
0.68, 0.85 |
<0.001 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.38 |
1.11, 1.70 |
0.003 |
| Â Â Â Â Asian or Pacific Islander |
0.91 |
0.63, 1.28 |
0.6 |
| Â Â Â Â American Indian or Alaska Native |
0.87 |
0.29, 2.13 |
0.8 |
| Â Â Â Â Other |
1.14 |
0.82, 1.56 |
0.4 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.12 |
0.77, 1.68 |
0.6 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.97 |
0.49, 1.79 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.99 |
0.83, 1.17 |
>0.9 |
| Charlson Comorbidity Index |
0.99 |
0.98, 1.01 |
0.4 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.07 |
0.92, 1.25 |
0.4 |
| Â Â Â Â Medicare |
0.96 |
0.77, 1.20 |
0.7 |
| Â Â Â Â Other Governmental |
0.50 |
0.20, 1.08 |
0.10 |
| Â Â Â Â Other |
0.96 |
0.39, 2.07 |
>0.9 |
| Socioeconomic Status |
0.92 |
0.67, 1.28 |
0.6 |
| Household Composition |
0.97 |
0.74, 1.29 |
0.8 |
| Minority and Language Status |
1.26 |
1.03, 1.55 |
0.027 |
| Housing and Transportation |
0.60 |
0.48, 0.76 |
<0.001 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(infliximab_acc_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 37.15099
degrees of freedom = 8
p-value = 1.0796e-05
# C-Statistic/AUROC
Cstat(infliximab_acc_themes)
[1] 0.7426675
# Model performance
model_performance(infliximab_acc_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
7942.509 | 7942.618 | 8099.495 | 0.129 | 0.365 | 0.924 | 0.426 | -Inf | 1.868e-04 | 0.732
performance::check_model(infliximab_acc_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(infliximab_acc_themes)
Average marginal effects
glm(formula = infliximab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(infliximab_acc_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme1")

cplot(infliximab_acc_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme2")

cplot(infliximab_acc_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme3")

cplot(infliximab_acc_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Infliximab Rx Given Theme4")

Adalimumab
Adalimumab rx + SVI
med_data_ALL$adalimumab_2 <- as.numeric(med_data_ALL$adalimumab_2)
adalimumab_rx <- glm(adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(adalimumab_rx )
Call:
glm(formula = adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.0343 -0.7932 -0.5876 -0.3683 2.4807
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.829283 0.214944 -3.858 0.000114 ***
ibd_3UC -0.988522 0.054302 -18.204 < 2e-16 ***
ibd_3IC -11.646814 186.705996 -0.062 0.950260
ibd_3Unknown -0.900672 0.445549 -2.021 0.043229 *
age_yrs -0.002819 0.001699 -1.660 0.097004 .
genderFemale 0.009114 0.051451 0.177 0.859391
race_5Black -0.030757 0.102749 -0.299 0.764684
race_5Asian or Pacific Islander -0.227785 0.177358 -1.284 0.199029
race_5American Indian or Alaska Native -0.274895 0.458350 -0.600 0.548673
race_5Other 0.012853 0.157884 0.081 0.935116
ethnic_3Non-Hispanic 0.259275 0.200753 1.292 0.196526
lang_3Other -0.405471 0.327117 -1.240 0.215150
act_tobYes 0.042623 0.078428 0.543 0.586811
max_ch -0.038261 0.006507 -5.880 4.09e-09 ***
insuranceMedicaid -0.094398 0.073783 -1.279 0.200760
insuranceMedicare -0.463871 0.088034 -5.269 1.37e-07 ***
insuranceOther Governmental -0.063300 0.304259 -0.208 0.835193
insuranceOther -0.163755 0.385538 -0.425 0.671023
RPL_THEMES 0.278900 0.105248 2.650 0.008051 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 9980.9 on 9335 degrees of freedom
Residual deviance: 9419.8 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 9457.8
Number of Fisher Scoring iterations: 11
broom::glance(adalimumab_rx )
broom::tidy(adalimumab_rx , exponentiate = TRUE)
tbl_regression(adalimumab_rx, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.37 |
0.33, 0.41 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.41 |
0.15, 0.90 |
0.043 |
| Age |
1.00 |
0.99, 1.00 |
0.10 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.01 |
0.91, 1.12 |
0.9 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.97 |
0.79, 1.18 |
0.8 |
| Â Â Â Â Asian or Pacific Islander |
0.80 |
0.56, 1.12 |
0.2 |
| Â Â Â Â American Indian or Alaska Native |
0.76 |
0.28, 1.74 |
0.5 |
| Â Â Â Â Other |
1.01 |
0.74, 1.37 |
>0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.30 |
0.88, 1.95 |
0.2 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.67 |
0.34, 1.22 |
0.2 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.04 |
0.89, 1.22 |
0.6 |
| Charlson Comorbidity Index |
0.96 |
0.95, 0.97 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.91 |
0.79, 1.05 |
0.2 |
| Â Â Â Â Medicare |
0.63 |
0.53, 0.75 |
<0.001 |
| Â Â Â Â Other Governmental |
0.94 |
0.50, 1.66 |
0.8 |
| Â Â Â Â Other |
0.85 |
0.38, 1.73 |
0.7 |
| Social Vulnerability Index |
1.32 |
1.08, 1.62 |
0.008 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(adalimumab_rx)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 12.26163
degrees of freedom = 8
p-value = 0.13991
# C-Statistic/AUROC
Cstat(adalimumab_rx)
[1] 0.6614528
# Model performance
model_performance(adalimumab_rx)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
9457.801 | 9457.883 | 9593.492 | 0.058 | 0.406 | 1.006 | 0.504 | -Inf | 1.855e-04 | 0.670
performance::check_model(adalimumab_rx)
Variable `Component` is not in your data frame :/

# Margins
margins(adalimumab_rx)
Average marginal effects
glm(formula = adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(adalimumab_rx, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given SVI")

Adalimumab rx + all themes
adalimumab_rx_themes <- glm(adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(adalimumab_rx_themes )
Call:
glm(formula = adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.0766 -0.7973 -0.5848 -0.3692 2.4997
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.853510 0.224384 -3.804 0.000142 ***
ibd_3UC -0.987032 0.054480 -18.117 < 2e-16 ***
ibd_3IC -11.712159 186.564537 -0.063 0.949943
ibd_3Unknown -0.907279 0.445548 -2.036 0.041718 *
age_yrs -0.002849 0.001704 -1.672 0.094612 .
genderFemale 0.012312 0.051602 0.239 0.811415
race_5Black -0.048463 0.104621 -0.463 0.643203
race_5Asian or Pacific Islander -0.200840 0.179426 -1.119 0.262993
race_5American Indian or Alaska Native -0.268899 0.459497 -0.585 0.558411
race_5Other 0.015452 0.159170 0.097 0.922662
ethnic_3Non-Hispanic 0.275651 0.202694 1.360 0.173849
lang_3Other -0.399732 0.328453 -1.217 0.223600
act_tobYes 0.029068 0.078737 0.369 0.712000
max_ch -0.038080 0.006528 -5.834 5.42e-09 ***
insuranceMedicaid -0.111380 0.074267 -1.500 0.133687
insuranceMedicare -0.467933 0.088183 -5.306 1.12e-07 ***
insuranceOther Governmental -0.069766 0.304290 -0.229 0.818655
insuranceOther -0.169025 0.385226 -0.439 0.660829
RPL_THEME1 0.365382 0.148941 2.453 0.014159 *
RPL_THEME2 0.141788 0.128351 1.105 0.269296
RPL_THEME3 0.035271 0.094344 0.374 0.708510
RPL_THEME4 -0.191057 0.108074 -1.768 0.077088 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 9930.5 on 9280 degrees of freedom
Residual deviance: 9365.8 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 9409.8
Number of Fisher Scoring iterations: 11
broom::glance(adalimumab_rx_themes )
broom::tidy(adalimumab_rx_themes , exponentiate = TRUE)
tbl_regression(adalimumab_rx_themes, 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 occurredWarning: collapsing to unique 'x' values
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.37 |
0.33, 0.41 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.40 |
0.15, 0.90 |
0.042 |
| Age |
1.00 |
0.99, 1.00 |
0.095 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.01 |
0.92, 1.12 |
0.8 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.95 |
0.77, 1.17 |
0.6 |
| Â Â Â Â Asian or Pacific Islander |
0.82 |
0.57, 1.15 |
0.3 |
| Â Â Â Â American Indian or Alaska Native |
0.76 |
0.28, 1.76 |
0.6 |
| Â Â Â Â Other |
1.02 |
0.74, 1.38 |
>0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.32 |
0.90, 1.99 |
0.2 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.67 |
0.34, 1.23 |
0.2 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.03 |
0.88, 1.20 |
0.7 |
| Charlson Comorbidity Index |
0.96 |
0.95, 0.97 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.89 |
0.77, 1.03 |
0.13 |
| Â Â Â Â Medicare |
0.63 |
0.53, 0.74 |
<0.001 |
| Â Â Â Â Other Governmental |
0.93 |
0.50, 1.65 |
0.8 |
| Â Â Â Â Other |
0.84 |
0.37, 1.72 |
0.7 |
| Socioeconomic Status |
1.44 |
1.08, 1.93 |
0.014 |
| Household Composition |
1.15 |
0.90, 1.48 |
0.3 |
| Minority and Language Status |
1.04 |
0.86, 1.25 |
0.7 |
| Housing and Transportation |
0.83 |
0.67, 1.02 |
0.077 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(adalimumab_rx_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 8.60229
degrees of freedom = 8
p-value = 0.37695
# C-Statistic/AUROC
Cstat(adalimumab_rx_themes)
[1] 0.6635756
# Model performance
model_performance(adalimumab_rx_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
9409.775 | 9409.885 | 9566.761 | 0.059 | 0.406 | 1.006 | 0.505 | -Inf | 1.866e-04 | 0.670
performance::check_model(adalimumab_rx_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(adalimumab_rx_themes)
Average marginal effects
glm(formula = adalimumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(adalimumab_rx_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given Theme1")

cplot(adalimumab_rx_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given Theme2")

cplot(adalimumab_rx_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given Theme3")

cplot(adalimumab_rx_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given Theme4")

Sustained adalimumab access + SVI
med_data_ALL$adalimumab_3 <- as.numeric(med_data_ALL$adalimumab_3)
adalimumab_access <- glm(adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(adalimumab_access )
Call:
glm(formula = adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.9149 -0.7042 -0.4912 -0.3553 2.6505
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.983773 0.234711 -4.191 2.77e-05 ***
ibd_3UC -0.987483 0.062868 -15.707 < 2e-16 ***
ibd_3IC -11.149864 186.608192 -0.060 0.9524
ibd_3Unknown -0.896710 0.530333 -1.691 0.0909 .
age_yrs -0.004287 0.001926 -2.226 0.0260 *
genderFemale -0.004705 0.058274 -0.081 0.9357
race_5Black 0.158045 0.111614 1.416 0.1568
race_5Asian or Pacific Islander -0.187030 0.199937 -0.935 0.3496
race_5American Indian or Alaska Native 0.183602 0.458993 0.400 0.6891
race_5Other -0.028958 0.179446 -0.161 0.8718
ethnic_3Non-Hispanic 0.081765 0.218582 0.374 0.7084
lang_3Other -0.035118 0.340718 -0.103 0.9179
act_tobYes 0.077033 0.087634 0.879 0.3794
max_ch -0.041392 0.007743 -5.346 8.99e-08 ***
insuranceMedicaid -0.100222 0.082451 -1.216 0.2242
insuranceMedicare -0.533817 0.104831 -5.092 3.54e-07 ***
insuranceOther Governmental -0.588787 0.407885 -1.444 0.1489
insuranceOther -0.243804 0.449357 -0.543 0.5874
RPL_THEMES 0.153724 0.119289 1.289 0.1975
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8233.5 on 9335 degrees of freedom
Residual deviance: 7772.0 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 7810
Number of Fisher Scoring iterations: 11
broom::glance(adalimumab_access )
broom::tidy(adalimumab_access , exponentiate = TRUE)
tbl_regression(adalimumab_access, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.37 |
0.33, 0.42 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.41 |
0.12, 1.03 |
0.091 |
| Age |
1.00 |
0.99, 1.00 |
0.026 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.00 |
0.89, 1.12 |
>0.9 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.17 |
0.94, 1.45 |
0.2 |
| Â Â Â Â Asian or Pacific Islander |
0.83 |
0.55, 1.21 |
0.3 |
| Â Â Â Â American Indian or Alaska Native |
1.20 |
0.44, 2.76 |
0.7 |
| Â Â Â Â Other |
0.97 |
0.68, 1.37 |
0.9 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.09 |
0.72, 1.69 |
0.7 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.97 |
0.47, 1.81 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.08 |
0.91, 1.28 |
0.4 |
| Charlson Comorbidity Index |
0.96 |
0.94, 0.97 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.90 |
0.77, 1.06 |
0.2 |
| Â Â Â Â Medicare |
0.59 |
0.48, 0.72 |
<0.001 |
| Â Â Â Â Other Governmental |
0.55 |
0.23, 1.16 |
0.15 |
| Â Â Â Â Other |
0.78 |
0.29, 1.76 |
0.6 |
| Social Vulnerability Index |
1.17 |
0.92, 1.47 |
0.2 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(adalimumab_access)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 9.73161
degrees of freedom = 8
p-value = 0.28437
# C-Statistic/AUROC
Cstat(adalimumab_access)
[1] 0.6666592
# Model performance
model_performance(adalimumab_access)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
7809.990 | 7810.072 | 7945.681 | 0.048 | 0.359 | 0.913 | 0.416 | -269.247 | 1.855e-04 | 0.743
performance::check_model(adalimumab_access)
Variable `Component` is not in your data frame :/

# Margins
margins(adalimumab_access)
Average marginal effects
glm(formula = adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(adalimumab_access, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Adalimumab Rx Given SVI")

Sustained adalimumab access + all themes
adalimumab_acc_themes <- glm(adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(adalimumab_acc_themes )
Call:
glm(formula = adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.9069 -0.7037 -0.4920 -0.3551 2.6418
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.068840 0.246180 -4.342 1.41e-05 ***
ibd_3UC -0.983950 0.062993 -15.620 < 2e-16 ***
ibd_3IC -11.177318 186.875419 -0.060 0.9523
ibd_3Unknown -0.898656 0.530379 -1.694 0.0902 .
age_yrs -0.004199 0.001932 -2.174 0.0297 *
genderFemale -0.003089 0.058394 -0.053 0.9578
race_5Black 0.134468 0.113537 1.184 0.2363
race_5Asian or Pacific Islander -0.224549 0.202106 -1.111 0.2665
race_5American Indian or Alaska Native 0.189302 0.459245 0.412 0.6802
race_5Other -0.052910 0.181118 -0.292 0.7702
ethnic_3Non-Hispanic 0.116391 0.221260 0.526 0.5989
lang_3Other -0.051590 0.341812 -0.151 0.8800
act_tobYes 0.080418 0.087838 0.916 0.3599
max_ch -0.041025 0.007757 -5.288 1.23e-07 ***
insuranceMedicaid -0.095786 0.082938 -1.155 0.2481
insuranceMedicare -0.528993 0.104980 -5.039 4.68e-07 ***
insuranceOther Governmental -0.582002 0.407937 -1.427 0.1537
insuranceOther -0.238243 0.449181 -0.530 0.5958
RPL_THEME1 0.114448 0.168360 0.680 0.4966
RPL_THEME2 0.014491 0.144845 0.100 0.9203
RPL_THEME3 0.156964 0.106846 1.469 0.1418
RPL_THEME4 -0.040210 0.122016 -0.330 0.7417
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 8197.7 on 9280 degrees of freedom
Residual deviance: 7740.1 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 7784.1
Number of Fisher Scoring iterations: 11
broom::glance(adalimumab_acc_themes )
broom::tidy(adalimumab_acc_themes , exponentiate = TRUE)
tbl_regression(adalimumab_acc_themes, 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.37 |
0.33, 0.42 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.41 |
0.12, 1.02 |
0.090 |
| Age |
1.00 |
0.99, 1.00 |
0.030 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.00 |
0.89, 1.12 |
>0.9 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.14 |
0.91, 1.43 |
0.2 |
| Â Â Â Â Asian or Pacific Islander |
0.80 |
0.53, 1.17 |
0.3 |
| Â Â Â Â American Indian or Alaska Native |
1.21 |
0.45, 2.78 |
0.7 |
| Â Â Â Â Other |
0.95 |
0.66, 1.34 |
0.8 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.12 |
0.74, 1.76 |
0.6 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.95 |
0.46, 1.79 |
0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.08 |
0.91, 1.28 |
0.4 |
| Charlson Comorbidity Index |
0.96 |
0.95, 0.97 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.91 |
0.77, 1.07 |
0.2 |
| Â Â Â Â Medicare |
0.59 |
0.48, 0.72 |
<0.001 |
| Â Â Â Â Other Governmental |
0.56 |
0.23, 1.16 |
0.2 |
| Â Â Â Â Other |
0.79 |
0.29, 1.77 |
0.6 |
| Socioeconomic Status |
1.12 |
0.81, 1.56 |
0.5 |
| Household Composition |
1.01 |
0.76, 1.35 |
>0.9 |
| Minority and Language Status |
1.17 |
0.95, 1.44 |
0.14 |
| Housing and Transportation |
0.96 |
0.76, 1.22 |
0.7 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(adalimumab_acc_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 9.51072
degrees of freedom = 8
p-value = 0.30106
# C-Statistic/AUROC
Cstat(adalimumab_acc_themes)
[1] 0.6667579
# Model performance
model_performance(adalimumab_acc_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
7784.113 | 7784.223 | 7941.099 | 0.048 | 0.359 | 0.914 | 0.417 | -269.090 | 1.866e-04 | 0.742
performance::check_model(adalimumab_acc_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(adalimumab_acc_themes)
Average marginal effects
glm(formula = adalimumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(adalimumab_acc_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Adalimumab Access Given Theme1")

cplot(adalimumab_acc_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Adalimumab Access Given Theme2")

cplot(adalimumab_acc_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Adalimumab Access Given Theme3")

cplot(adalimumab_acc_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Adalimumab Access Given Theme4")

Vedolizumab
Vedolizumab rx + SVI
med_data_ALL$vedolizumab_2 <- as.numeric(med_data_ALL$vedolizumab_2)
vedolizumab_rx <- glm(vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(vedolizumab_rx )
Call:
glm(formula = vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.7601 -0.5258 -0.4847 -0.4372 2.6111
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.507063 0.247142 -6.098 1.07e-09 ***
ibd_3UC -0.062218 0.066163 -0.940 0.3470
ibd_3IC -10.250642 187.241207 -0.055 0.9563
ibd_3Unknown -1.704510 1.014092 -1.681 0.0928 .
age_yrs -0.010272 0.002187 -4.696 2.65e-06 ***
genderFemale 0.065424 0.065441 1.000 0.3174
race_5Black -0.193548 0.143923 -1.345 0.1787
race_5Asian or Pacific Islander 0.053099 0.202875 0.262 0.7935
race_5American Indian or Alaska Native -0.353076 0.606337 -0.582 0.5604
race_5Other 0.302577 0.178987 1.691 0.0909 .
ethnic_3Non-Hispanic -0.065382 0.225120 -0.290 0.7715
lang_3Other 0.026753 0.352245 0.076 0.9395
act_tobYes -0.253396 0.112424 -2.254 0.0242 *
max_ch 0.030682 0.007039 4.359 1.31e-05 ***
insuranceMedicaid -0.089833 0.098295 -0.914 0.3608
insuranceMedicare -0.036210 0.105300 -0.344 0.7309
insuranceOther Governmental -1.061399 0.594020 -1.787 0.0740 .
insuranceOther -0.575435 0.601791 -0.956 0.3390
RPL_THEMES -0.108908 0.136326 -0.799 0.4244
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6701.1 on 9335 degrees of freedom
Residual deviance: 6642.2 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 6680.2
Number of Fisher Scoring iterations: 11
broom::glance(vedolizumab_rx )
broom::tidy(vedolizumab_rx , exponentiate = TRUE)
tbl_regression(vedolizumab_rx, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurred
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.94 |
0.83, 1.07 |
0.3 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.18 |
0.01, 0.84 |
0.093 |
| Age |
0.99 |
0.99, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.07 |
0.94, 1.21 |
0.3 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.82 |
0.62, 1.08 |
0.2 |
| Â Â Â Â Asian or Pacific Islander |
1.05 |
0.70, 1.54 |
0.8 |
| Â Â Â Â American Indian or Alaska Native |
0.70 |
0.17, 1.97 |
0.6 |
| Â Â Â Â Other |
1.35 |
0.94, 1.90 |
0.091 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.94 |
0.61, 1.48 |
0.8 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.03 |
0.49, 1.96 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.78 |
0.62, 0.96 |
0.024 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.05 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.91 |
0.75, 1.11 |
0.4 |
| Â Â Â Â Medicare |
0.96 |
0.78, 1.18 |
0.7 |
| Â Â Â Â Other Governmental |
0.35 |
0.08, 0.94 |
0.074 |
| Â Â Â Â Other |
0.56 |
0.14, 1.56 |
0.3 |
| Social Vulnerability Index |
0.90 |
0.69, 1.17 |
0.4 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(vedolizumab_rx)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 8.04922
degrees of freedom = 8
p-value = 0.42868
# C-Statistic/AUROC
Cstat(vedolizumab_rx)
[1] 0.5661039
# Model performance
model_performance(vedolizumab_rx)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
6680.220 | 6680.302 | 6815.911 | 0.006 | 0.319 | 0.844 | 0.356 | -133.389 | 1.855e-04 | 0.796
performance::check_model(vedolizumab_rx)
Variable `Component` is not in your data frame :/

# Margins
margins(vedolizumab_rx)
Average marginal effects
glm(formula = vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(vedolizumab_rx, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given SVI")

Vedolizumab rx + all themes
vedolizumab_rx_themes <- glm(vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch +
insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(vedolizumab_rx_themes )
Call:
glm(formula = vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.7677 -0.5270 -0.4842 -0.4350 2.6080
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.522127 0.259883 -5.857 4.71e-09 ***
ibd_3UC -0.059722 0.066323 -0.900 0.3679
ibd_3IC -10.263548 187.019293 -0.055 0.9562
ibd_3Unknown -1.710615 1.014156 -1.687 0.0917 .
age_yrs -0.010069 0.002194 -4.590 4.44e-06 ***
genderFemale 0.072529 0.065617 1.105 0.2690
race_5Black -0.237396 0.145987 -1.626 0.1039
race_5Asian or Pacific Islander 0.019012 0.205593 0.092 0.9263
race_5American Indian or Alaska Native -0.353147 0.606661 -0.582 0.5605
race_5Other 0.271259 0.180626 1.502 0.1332
ethnic_3Non-Hispanic -0.030102 0.227731 -0.132 0.8948
lang_3Other -0.014765 0.353260 -0.042 0.9667
act_tobYes -0.268767 0.113080 -2.377 0.0175 *
max_ch 0.030898 0.007059 4.377 1.20e-05 ***
insuranceMedicaid -0.094943 0.098773 -0.961 0.3364
insuranceMedicare -0.033789 0.105581 -0.320 0.7489
insuranceOther Governmental -1.073149 0.594107 -1.806 0.0709 .
insuranceOther -0.585295 0.602002 -0.972 0.3309
RPL_THEME1 0.272199 0.189915 1.433 0.1518
RPL_THEME2 -0.302717 0.164057 -1.845 0.0650 .
RPL_THEME3 0.055170 0.119407 0.462 0.6441
RPL_THEME4 -0.160658 0.137220 -1.171 0.2417
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 6671.3 on 9280 degrees of freedom
Residual deviance: 6607.7 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 6651.7
Number of Fisher Scoring iterations: 11
broom::glance(vedolizumab_rx_themes )
broom::tidy(vedolizumab_rx_themes , exponentiate = TRUE)
tbl_regression(vedolizumab_rx_themes, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: collapsing to unique 'x' values
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.94 |
0.83, 1.07 |
0.4 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.18 |
0.01, 0.83 |
0.092 |
| Age |
0.99 |
0.99, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.08 |
0.95, 1.22 |
0.3 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.79 |
0.59, 1.04 |
0.10 |
| Â Â Â Â Asian or Pacific Islander |
1.02 |
0.67, 1.50 |
>0.9 |
| Â Â Â Â American Indian or Alaska Native |
0.70 |
0.17, 1.98 |
0.6 |
| Â Â Â Â Other |
1.31 |
0.91, 1.85 |
0.13 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.97 |
0.63, 1.55 |
0.9 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.99 |
0.47, 1.88 |
>0.9 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.76 |
0.61, 0.95 |
0.017 |
| Charlson Comorbidity Index |
1.03 |
1.02, 1.05 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.91 |
0.75, 1.10 |
0.3 |
| Â Â Â Â Medicare |
0.97 |
0.78, 1.19 |
0.7 |
| Â Â Â Â Other Governmental |
0.34 |
0.08, 0.93 |
0.071 |
| Â Â Â Â Other |
0.56 |
0.13, 1.55 |
0.3 |
| Socioeconomic Status |
1.31 |
0.90, 1.90 |
0.2 |
| Household Composition |
0.74 |
0.54, 1.02 |
0.065 |
| Minority and Language Status |
1.06 |
0.84, 1.34 |
0.6 |
| Housing and Transportation |
0.85 |
0.65, 1.11 |
0.2 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(vedolizumab_rx_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 2.78657
degrees of freedom = 8
p-value = 0.94703
# C-Statistic/AUROC
Cstat(vedolizumab_rx_themes)
[1] 0.5713701
# Model performance
model_performance(vedolizumab_rx_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
6651.665 | 6651.774 | 6808.651 | 0.007 | 0.319 | 0.845 | 0.356 | -133.246 | 1.866e-04 | 0.796
performance::check_model(vedolizumab_rx_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(vedolizumab_rx_themes)
Average marginal effects
glm(formula = vedolizumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(vedolizumab_rx_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given Theme1")

cplot(vedolizumab_rx_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given Theme2")

cplot(vedolizumab_rx_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given Theme3")

cplot(vedolizumab_rx_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given Theme4")

Sustained vedolizumab access + SVI
med_data_ALL$vedolizumab_3 <- as.numeric(med_data_ALL$vedolizumab_3)
vedolizumab_access <- glm(vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(vedolizumab_access )
Call:
glm(formula = vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8675 -0.4200 -0.3721 -0.3243 2.6436
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.508e+00 2.790e-01 -5.404 6.53e-08 ***
ibd_3UC -4.177e-03 8.178e-02 -0.051 0.95927
ibd_3IC -1.366e+01 1.379e+03 -0.010 0.99210
ibd_3Unknown -1.399e+01 3.675e+02 -0.038 0.96963
age_yrs -1.708e-02 2.731e-03 -6.257 3.92e-10 ***
genderFemale 7.924e-03 8.079e-02 0.098 0.92186
race_5Black 7.489e-02 1.672e-01 0.448 0.65426
race_5Asian or Pacific Islander -1.463e-01 2.694e-01 -0.543 0.58706
race_5American Indian or Alaska Native 1.812e-01 6.086e-01 0.298 0.76596
race_5Other 4.010e-01 2.060e-01 1.946 0.05161 .
ethnic_3Non-Hispanic -2.915e-01 2.500e-01 -1.166 0.24362
lang_3Other 4.803e-01 3.778e-01 1.271 0.20362
act_tobYes -1.158e-01 1.341e-01 -0.864 0.38756
max_ch 5.113e-02 8.432e-03 6.064 1.33e-09 ***
insuranceMedicaid 2.558e-02 1.181e-01 0.217 0.82845
insuranceMedicare 9.393e-02 1.314e-01 0.715 0.47462
insuranceOther Governmental -1.404e+01 2.881e+02 -0.049 0.96113
insuranceOther -4.671e-01 7.293e-01 -0.640 0.52185
RPL_THEMES -5.222e-01 1.718e-01 -3.040 0.00237 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 4856.5 on 9335 degrees of freedom
Residual deviance: 4763.7 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 4801.7
Number of Fisher Scoring iterations: 15
broom::glance(vedolizumab_access )
broom::tidy(vedolizumab_access , exponentiate = TRUE)
tbl_regression(vedolizumab_access, 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 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 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: algorithm did not convergeWarning: 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 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 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.00 |
0.85, 1.17 |
>0.9 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.00 |
0.00, 7.38 |
>0.9 |
| Age |
0.98 |
0.98, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.01 |
0.86, 1.18 |
>0.9 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.08 |
0.77, 1.48 |
0.7 |
| Â Â Â Â Asian or Pacific Islander |
0.86 |
0.49, 1.42 |
0.6 |
| Â Â Â Â American Indian or Alaska Native |
1.20 |
0.29, 3.39 |
0.8 |
| Â Â Â Â Other |
1.49 |
0.98, 2.21 |
0.052 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.75 |
0.47, 1.25 |
0.2 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.62 |
0.72, 3.23 |
0.2 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.89 |
0.68, 1.15 |
0.4 |
| Charlson Comorbidity Index |
1.05 |
1.04, 1.07 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.03 |
0.81, 1.29 |
0.8 |
| Â Â Â Â Medicare |
1.10 |
0.85, 1.42 |
0.5 |
| Â Â Â Â Other Governmental |
0.00 |
0.00, 0.04 |
>0.9 |
| Â Â Â Â Other |
0.63 |
0.10, 2.06 |
0.5 |
| Social Vulnerability Index |
0.59 |
0.42, 0.83 |
0.002 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(vedolizumab_access)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 7.4647
degrees of freedom = 8
p-value = 0.48742
# C-Statistic/AUROC
Cstat(vedolizumab_access)
[1] 0.6025848
# Model performance
model_performance(vedolizumab_access)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
4801.692 | 4801.773 | 4937.383 | 0.009 | 0.258 | 0.715 | 0.255 | -50.933 | 0.001 | 0.867
performance::check_model(vedolizumab_access)
Variable `Component` is not in your data frame :/

# Margins
margins(vedolizumab_access)
Average marginal effects
glm(formula = vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(vedolizumab_access, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Vedolizumab Rx Given SVI")

Sustained vedolizumab access + all themes
vedolizumab_acc_themes <- glm(vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 +
act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(vedolizumab_acc_themes )
Call:
glm(formula = vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8767 -0.4218 -0.3711 -0.3201 2.6868
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.554e+00 2.958e-01 -5.252 1.50e-07 ***
ibd_3UC -5.134e-03 8.202e-02 -0.063 0.95009
ibd_3IC -1.371e+01 1.374e+03 -0.010 0.99203
ibd_3Unknown -1.399e+01 3.670e+02 -0.038 0.96959
age_yrs -1.670e-02 2.742e-03 -6.091 1.12e-09 ***
genderFemale 1.524e-02 8.105e-02 0.188 0.85087
race_5Black -2.381e-02 1.697e-01 -0.140 0.88839
race_5Asian or Pacific Islander -2.443e-01 2.719e-01 -0.898 0.36893
race_5American Indian or Alaska Native 1.869e-01 6.096e-01 0.307 0.75916
race_5Other 3.336e-01 2.081e-01 1.603 0.10895
ethnic_3Non-Hispanic -2.427e-01 2.531e-01 -0.959 0.33769
lang_3Other 3.772e-01 3.787e-01 0.996 0.31925
act_tobYes -1.347e-01 1.352e-01 -0.996 0.31910
max_ch 5.150e-02 8.459e-03 6.088 1.14e-09 ***
insuranceMedicaid 2.765e-02 1.187e-01 0.233 0.81582
insuranceMedicare 1.014e-01 1.319e-01 0.769 0.44200
insuranceOther Governmental -1.404e+01 2.877e+02 -0.049 0.96106
insuranceOther -4.665e-01 7.296e-01 -0.639 0.52253
RPL_THEME1 1.628e-01 2.354e-01 0.691 0.48931
RPL_THEME2 -5.489e-01 2.050e-01 -2.677 0.00743 **
RPL_THEME3 2.009e-01 1.478e-01 1.360 0.17395
RPL_THEME4 -3.436e-01 1.706e-01 -2.013 0.04407 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 4832.9 on 9280 degrees of freedom
Residual deviance: 4731.2 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 4775.2
Number of Fisher Scoring iterations: 15
broom::glance(vedolizumab_acc_themes )
broom::tidy(vedolizumab_acc_themes , exponentiate = TRUE)
tbl_regression(vedolizumab_acc_themes, 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 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 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: algorithm did not convergeWarning: 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 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 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
1.0 |
0.85, 1.17 |
>0.9 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.00 |
0.00, 7.23 |
>0.9 |
| Age |
0.98 |
0.98, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.02 |
0.87, 1.19 |
0.9 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
0.98 |
0.69, 1.35 |
0.9 |
| Â Â Â Â Asian or Pacific Islander |
0.78 |
0.44, 1.29 |
0.4 |
| Â Â Â Â American Indian or Alaska Native |
1.21 |
0.29, 3.42 |
0.8 |
| Â Â Â Â Other |
1.40 |
0.91, 2.07 |
0.11 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
0.78 |
0.49, 1.32 |
0.3 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.46 |
0.65, 2.92 |
0.3 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
0.87 |
0.67, 1.13 |
0.3 |
| Charlson Comorbidity Index |
1.05 |
1.04, 1.07 |
<0.001 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
1.03 |
0.81, 1.29 |
0.8 |
| Â Â Â Â Medicare |
1.11 |
0.85, 1.43 |
0.4 |
| Â Â Â Â Other Governmental |
0.00 |
0.00, 0.04 |
>0.9 |
| Â Â Â Â Other |
0.63 |
0.10, 2.07 |
0.5 |
| Socioeconomic Status |
1.18 |
0.74, 1.86 |
0.5 |
| Household Composition |
0.58 |
0.39, 0.86 |
0.007 |
| Minority and Language Status |
1.22 |
0.92, 1.63 |
0.2 |
| Housing and Transportation |
0.71 |
0.51, 0.99 |
0.044 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(vedolizumab_acc_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 2.3236
degrees of freedom = 8
p-value = 0.96945
# C-Statistic/AUROC
Cstat(vedolizumab_acc_themes)
[1] 0.6088863
# Model performance
model_performance(vedolizumab_acc_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
4775.248 | 4775.357 | 4932.234 | 0.010 | 0.258 | 0.715 | 0.255 | -50.811 | 0.001 | 0.867
performance::check_model(vedolizumab_acc_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(vedolizumab_acc_themes)
Average marginal effects
glm(formula = vedolizumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(vedolizumab_acc_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Vedolizumab Access Given Theme1")

cplot(vedolizumab_acc_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Vedolizumab Access Given Theme2")

cplot(vedolizumab_acc_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Vedolizumab Access Given Theme3")

cplot(vedolizumab_acc_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Vedolizumab Access Given Theme4")

Ustekinumab
Ustekinumab rx + SVI
med_data_ALL$ustekinumab_2 <- as.numeric(med_data_ALL$ustekinumab_2)
uste_rx <- glm(ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(uste_rx )
Call:
glm(formula = ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8820 -0.6705 -0.3419 -0.2852 2.6970
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.289044 0.278036 -4.636 3.55e-06 ***
ibd_3UC -1.619526 0.078832 -20.544 < 2e-16 ***
ibd_3IC -11.251706 187.319315 -0.060 0.95210
ibd_3Unknown -2.343443 1.013670 -2.312 0.02079 *
age_yrs -0.006367 0.002129 -2.990 0.00279 **
genderFemale 0.139655 0.064403 2.168 0.03013 *
race_5Black 0.081413 0.121781 0.669 0.50380
race_5Asian or Pacific Islander -0.400924 0.251949 -1.591 0.11154
race_5American Indian or Alaska Native -0.857585 0.740282 -1.158 0.24668
race_5Other -0.121211 0.211514 -0.573 0.56660
ethnic_3Non-Hispanic 0.180863 0.262425 0.689 0.49070
lang_3Other -0.150131 0.416452 -0.361 0.71847
act_tobYes 0.109337 0.093667 1.167 0.24309
max_ch -0.009109 0.007801 -1.168 0.24293
insuranceMedicaid -0.180114 0.092087 -1.956 0.05048 .
insuranceMedicare -0.210964 0.106122 -1.988 0.04682 *
insuranceOther Governmental -0.701083 0.476686 -1.471 0.14136
insuranceOther 0.118294 0.460338 0.257 0.79720
RPL_THEMES 0.223350 0.130226 1.715 0.08633 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 7234.8 on 9335 degrees of freedom
Residual deviance: 6593.4 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 6631.4
Number of Fisher Scoring iterations: 11
broom::glance(uste_rx )
broom::tidy(uste_rx , exponentiate = TRUE)
tbl_regression(uste_rx, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurred
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.20 |
0.17, 0.23 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.10 |
0.01, 0.44 |
0.021 |
| Age |
0.99 |
0.99, 1.00 |
0.003 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.15 |
1.01, 1.30 |
0.030 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.08 |
0.85, 1.37 |
0.5 |
| Â Â Â Â Asian or Pacific Islander |
0.67 |
0.40, 1.07 |
0.11 |
| Â Â Â Â American Indian or Alaska Native |
0.42 |
0.07, 1.44 |
0.2 |
| Â Â Â Â Other |
0.89 |
0.58, 1.32 |
0.6 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.20 |
0.73, 2.06 |
0.5 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.86 |
0.35, 1.83 |
0.7 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.12 |
0.93, 1.34 |
0.2 |
| Charlson Comorbidity Index |
0.99 |
0.98, 1.01 |
0.2 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.84 |
0.70, 1.00 |
0.050 |
| Â Â Â Â Medicare |
0.81 |
0.66, 1.00 |
0.047 |
| Â Â Â Â Other Governmental |
0.50 |
0.17, 1.15 |
0.14 |
| Â Â Â Â Other |
1.13 |
0.41, 2.60 |
0.8 |
| Social Vulnerability Index |
1.25 |
0.97, 1.61 |
0.086 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(uste_rx)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 12.6737
degrees of freedom = 8
p-value = 0.12358
# C-Statistic/AUROC
Cstat(uste_rx)
[1] 0.7079795
# Model performance
model_performance(uste_rx)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
6631.378 | 6631.460 | 6767.069 | 0.065 | 0.326 | 0.841 | 0.353 | -175.927 | 1.855e-04 | 0.788
performance::check_model(uste_rx)
Variable `Component` is not in your data frame :/

# Margins
margins(uste_rx)
Average marginal effects
glm(formula = ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(uste_rx, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given SVI")

Ustekinumab rx + all themes
uste_rx_themes <- glm(ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(uste_rx_themes )
Call:
glm(formula = ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8905 -0.6667 -0.3425 -0.2852 2.6939
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.259522 0.287543 -4.380 1.19e-05 ***
ibd_3UC -1.616909 0.079185 -20.419 < 2e-16 ***
ibd_3IC -11.297453 186.968149 -0.060 0.95182
ibd_3Unknown -2.348492 1.013730 -2.317 0.02052 *
age_yrs -0.006450 0.002137 -3.018 0.00254 **
genderFemale 0.143175 0.064650 2.215 0.02679 *
race_5Black 0.077083 0.124140 0.621 0.53464
race_5Asian or Pacific Islander -0.348648 0.254016 -1.373 0.16989
race_5American Indian or Alaska Native -0.855073 0.740642 -1.155 0.24829
race_5Other -0.092375 0.212170 -0.435 0.66328
ethnic_3Non-Hispanic 0.161851 0.262491 0.617 0.53750
lang_3Other -0.145949 0.417874 -0.349 0.72689
act_tobYes 0.091889 0.094108 0.976 0.32885
max_ch -0.009417 0.007841 -1.201 0.22977
insuranceMedicaid -0.198586 0.092697 -2.142 0.03217 *
insuranceMedicare -0.210563 0.106321 -1.980 0.04765 *
insuranceOther Governmental -0.707349 0.476805 -1.484 0.13794
insuranceOther 0.115923 0.460193 0.252 0.80112
RPL_THEME1 0.346904 0.185552 1.870 0.06154 .
RPL_THEME2 0.116814 0.160271 0.729 0.46609
RPL_THEME3 -0.047856 0.117634 -0.407 0.68414
RPL_THEME4 -0.158405 0.134720 -1.176 0.23967
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 7189.1 on 9280 degrees of freedom
Residual deviance: 6547.7 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 6591.7
Number of Fisher Scoring iterations: 11
broom::glance(uste_rx_themes )
broom::tidy(uste_rx_themes , exponentiate = TRUE)
tbl_regression(uste_rx_themes, 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 occurredWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredWarning: collapsing to unique 'x' values
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.20 |
0.17, 0.23 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.10 |
0.01, 0.44 |
0.021 |
| Age |
0.99 |
0.99, 1.00 |
0.003 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.15 |
1.02, 1.31 |
0.027 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.08 |
0.84, 1.37 |
0.5 |
| Â Â Â Â Asian or Pacific Islander |
0.71 |
0.42, 1.13 |
0.2 |
| Â Â Â Â American Indian or Alaska Native |
0.43 |
0.07, 1.45 |
0.2 |
| Â Â Â Â Other |
0.91 |
0.59, 1.36 |
0.7 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.18 |
0.72, 2.02 |
0.5 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
0.86 |
0.35, 1.84 |
0.7 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.10 |
0.91, 1.32 |
0.3 |
| Charlson Comorbidity Index |
0.99 |
0.98, 1.01 |
0.2 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.82 |
0.68, 0.98 |
0.032 |
| Â Â Â Â Medicare |
0.81 |
0.66, 1.00 |
0.048 |
| Â Â Â Â Other Governmental |
0.49 |
0.17, 1.14 |
0.14 |
| Â Â Â Â Other |
1.12 |
0.41, 2.59 |
0.8 |
| Socioeconomic Status |
1.41 |
0.98, 2.03 |
0.062 |
| Household Composition |
1.12 |
0.82, 1.54 |
0.5 |
| Minority and Language Status |
0.95 |
0.76, 1.20 |
0.7 |
| Housing and Transportation |
0.85 |
0.66, 1.11 |
0.2 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(uste_rx_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 9.66921
degrees of freedom = 8
p-value = 0.28901
# C-Statistic/AUROC
Cstat(uste_rx_themes)
[1] 0.709733
# Model performance
model_performance(uste_rx_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
6591.730 | 6591.839 | 6748.716 | 0.065 | 0.326 | 0.841 | 0.353 | -174.703 | 1.866e-04 | 0.788
performance::check_model(uste_rx_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(uste_rx_themes)
Average marginal effects
glm(formula = ustekinumab_2 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(uste_rx_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given Theme1")

cplot(uste_rx_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given Theme2")

cplot(uste_rx_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given Theme3")

cplot(uste_rx_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given Theme4")

Sustained ustekinumab access + SVI
med_data_ALL$ustekinumab_3 <- as.numeric(med_data_ALL$ustekinumab_3)
uste_access <- glm(ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 +
+ lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial",
data = med_data_ALL)
summary(uste_access )
Call:
glm(formula = ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES,
family = "binomial", data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.7664 -0.5441 -0.2725 -0.2152 2.9610
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.740e+00 3.601e-01 -4.831 1.36e-06 ***
ibd_3UC -1.745e+00 1.013e-01 -17.218 < 2e-16 ***
ibd_3IC -1.365e+01 8.399e+02 -0.016 0.9870
ibd_3Unknown -1.371e+01 2.234e+02 -0.061 0.9511
age_yrs -1.183e-02 2.553e-03 -4.632 3.63e-06 ***
genderFemale 1.403e-01 7.661e-02 1.831 0.0670 .
race_5Black 3.667e-02 1.431e-01 0.256 0.7977
race_5Asian or Pacific Islander -4.172e-01 3.009e-01 -1.386 0.1656
race_5American Indian or Alaska Native -1.101e+00 1.025e+00 -1.074 0.2828
race_5Other -4.232e-01 2.830e-01 -1.495 0.1348
ethnic_3Non-Hispanic 3.752e-01 3.446e-01 1.089 0.2761
lang_3Other 2.527e-01 4.516e-01 0.560 0.5758
act_tobYes 3.574e-02 1.121e-01 0.319 0.7498
max_ch 4.777e-05 9.419e-03 0.005 0.9960
insuranceMedicaid -1.761e-01 1.074e-01 -1.640 0.1010
insuranceMedicare -2.997e-01 1.327e-01 -2.258 0.0239 *
insuranceOther Governmental -1.231e+00 7.271e-01 -1.694 0.0904 .
insuranceOther -2.082e-01 6.161e-01 -0.338 0.7354
RPL_THEMES 3.318e-01 1.543e-01 2.151 0.0315 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 5512.6 on 9335 degrees of freedom
Residual deviance: 4985.7 on 9317 degrees of freedom
(458 observations deleted due to missingness)
AIC: 5023.7
Number of Fisher Scoring iterations: 14
broom::glance(uste_access )
broom::tidy(uste_access , exponentiate = TRUE)
tbl_regression(uste_access, 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 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 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 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: collapsing to unique 'x' values
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.17 |
0.14, 0.21 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.00 |
0.00, 0.02 |
>0.9 |
| Age |
0.99 |
0.98, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.15 |
0.99, 1.34 |
0.067 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.04 |
0.78, 1.36 |
0.8 |
| Â Â Â Â Asian or Pacific Islander |
0.66 |
0.35, 1.14 |
0.2 |
| Â Â Â Â American Indian or Alaska Native |
0.33 |
0.02, 1.59 |
0.3 |
| Â Â Â Â Other |
0.65 |
0.36, 1.10 |
0.13 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.46 |
0.78, 3.04 |
0.3 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.29 |
0.48, 2.90 |
0.6 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.04 |
0.83, 1.29 |
0.7 |
| Charlson Comorbidity Index |
1.00 |
0.98, 1.02 |
>0.9 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.84 |
0.68, 1.03 |
0.10 |
| Â Â Â Â Medicare |
0.74 |
0.57, 0.96 |
0.024 |
| Â Â Â Â Other Governmental |
0.29 |
0.05, 0.96 |
0.090 |
| Â Â Â Â Other |
0.81 |
0.19, 2.34 |
0.7 |
| Social Vulnerability Index |
1.39 |
1.03, 1.88 |
0.032 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(uste_access)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 10.96141
degrees of freedom = 8
p-value = 0.2039
# C-Statistic/AUROC
Cstat(uste_access)
[1] 0.7272509
# Model performance
model_performance(uste_access)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
5023.686 | 5023.768 | 5159.377 | 0.053 | 0.274 | 0.732 | 0.267 | -75.420 | 7.215e-04 | 0.850
performance::check_model(uste_access)
Variable `Component` is not in your data frame :/

# Margins
margins(uste_access)
Average marginal effects
glm(formula = ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + +lang_3 + act_tob + max_ch + insurance + RPL_THEMES, family = "binomial", data = med_data_ALL)
cplot(uste_access, "RPL_THEMES", what = "prediction", main = "Predicted Likelihood of Ustekinumab Rx Given SVI")

Sustained ustekinumab access + all themes
uste_acc_themes <- glm(ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1
+ RPL_THEME2 + RPL_THEME3 + RPL_THEME4,
family = "binomial",
data = med_data_ALL)
summary(uste_acc_themes )
Call:
glm(formula = ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 +
ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 +
RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial",
data = med_data_ALL)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.8511 -0.5405 -0.2746 -0.2148 2.9534
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.780e+00 3.707e-01 -4.803 1.57e-06 ***
ibd_3UC -1.734e+00 1.014e-01 -17.098 < 2e-16 ***
ibd_3IC -1.376e+01 8.379e+02 -0.016 0.9869
ibd_3Unknown -1.371e+01 2.233e+02 -0.061 0.9510
age_yrs -1.192e-02 2.560e-03 -4.656 3.23e-06 ***
genderFemale 1.430e-01 7.680e-02 1.862 0.0626 .
race_5Black -3.943e-03 1.457e-01 -0.027 0.9784
race_5Asian or Pacific Islander -4.006e-01 3.029e-01 -1.323 0.1859
race_5American Indian or Alaska Native -1.098e+00 1.026e+00 -1.070 0.2845
race_5Other -4.163e-01 2.834e-01 -1.469 0.1419
ethnic_3Non-Hispanic 3.723e-01 3.444e-01 1.081 0.2798
lang_3Other 2.273e-01 4.532e-01 0.502 0.6159
act_tobYes 2.496e-02 1.124e-01 0.222 0.8242
max_ch 5.128e-04 9.441e-03 0.054 0.9567
insuranceMedicaid -1.997e-01 1.081e-01 -1.847 0.0647 .
insuranceMedicare -3.037e-01 1.329e-01 -2.285 0.0223 *
insuranceOther Governmental -1.235e+00 7.272e-01 -1.698 0.0895 .
insuranceOther -2.015e-01 6.158e-01 -0.327 0.7435
RPL_THEME1 4.699e-01 2.191e-01 2.145 0.0320 *
RPL_THEME2 1.643e-01 1.898e-01 0.865 0.3868
RPL_THEME3 1.247e-01 1.397e-01 0.893 0.3718
RPL_THEME4 -2.673e-01 1.600e-01 -1.670 0.0949 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 5488.4 on 9280 degrees of freedom
Residual deviance: 4960.4 on 9259 degrees of freedom
(513 observations deleted due to missingness)
AIC: 5004.4
Number of Fisher Scoring iterations: 14
broom::glance(uste_acc_themes )
broom::tidy(uste_acc_themes , exponentiate = TRUE)
tbl_regression(uste_acc_themes, 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 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 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 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
| Characteristic |
OR |
95% CI |
p-value |
| IBD Diagnosis |
|
|
|
| Â Â Â Â CD |
— |
— |
|
| Â Â Â Â UC |
0.18 |
0.14, 0.21 |
<0.001 |
| Â Â Â Â IC |
0.00 |
|
>0.9 |
| Â Â Â Â Unknown |
0.00 |
0.00, 0.02 |
>0.9 |
| Age |
0.99 |
0.98, 0.99 |
<0.001 |
| Gender |
|
|
|
| Â Â Â Â Male |
— |
— |
|
| Â Â Â Â Female |
1.15 |
0.99, 1.34 |
0.063 |
| Race |
|
|
|
| Â Â Â Â White |
— |
— |
|
| Â Â Â Â Black |
1.00 |
0.74, 1.32 |
>0.9 |
| Â Â Â Â Asian or Pacific Islander |
0.67 |
0.35, 1.17 |
0.2 |
| Â Â Â Â American Indian or Alaska Native |
0.33 |
0.02, 1.60 |
0.3 |
| Â Â Â Â Other |
0.66 |
0.36, 1.11 |
0.14 |
| Ethnicity |
|
|
|
| Â Â Â Â Hispanic |
— |
— |
|
| Â Â Â Â Non-Hispanic |
1.45 |
0.77, 3.03 |
0.3 |
| Preferred Language |
|
|
|
| Â Â Â Â English |
— |
— |
|
| Â Â Â Â Other |
1.26 |
0.47, 2.84 |
0.6 |
| Active Tobacco Use |
|
|
|
| Â Â Â Â No |
— |
— |
|
| Â Â Â Â Yes |
1.03 |
0.82, 1.27 |
0.8 |
| Charlson Comorbidity Index |
1.00 |
0.98, 1.02 |
>0.9 |
| Insurance Type |
|
|
|
| Â Â Â Â Private Insurance |
— |
— |
|
| Â Â Â Â Medicaid |
0.82 |
0.66, 1.01 |
0.065 |
| Â Â Â Â Medicare |
0.74 |
0.57, 0.95 |
0.022 |
| Â Â Â Â Other Governmental |
0.29 |
0.05, 0.95 |
0.089 |
| Â Â Â Â Other |
0.82 |
0.19, 2.35 |
0.7 |
| Socioeconomic Status |
1.60 |
1.04, 2.46 |
0.032 |
| Household Composition |
1.18 |
0.81, 1.71 |
0.4 |
| Minority and Language Status |
1.13 |
0.86, 1.49 |
0.4 |
| Housing and Transportation |
0.77 |
0.56, 1.05 |
0.095 |
# Hosmer-Lemeshow Goodness-of-Fit Test
hltest(uste_acc_themes)
The Hosmer-Lemeshow goodness-of-fit test
Statistic = 9.68348
degrees of freedom = 8
p-value = 0.28795
# C-Statistic/AUROC
Cstat(uste_acc_themes)
[1] 0.7297261
# Model performance
model_performance(uste_acc_themes)
# Indices of model performance
AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
-----------------------------------------------------------------------------------------------------------
5004.362 | 5004.471 | 5161.348 | 0.054 | 0.274 | 0.732 | 0.267 | -75.352 | 7.263e-04 | 0.850
performance::check_model(uste_acc_themes)
Variable `Component` is not in your data frame :/

# Margins
margins(uste_acc_themes)
Average marginal effects
glm(formula = ustekinumab_3 ~ ibd_3 + age_yrs + gender + race_5 + ethnic_3 + lang_3 + act_tob + max_ch + insurance + RPL_THEME1 + RPL_THEME2 + RPL_THEME3 + RPL_THEME4, family = "binomial", data = med_data_ALL)
cplot(uste_acc_themes, "RPL_THEME1", what = "prediction", main = "Predicted Likelihood of Ustekinumab Access Given Theme1")

cplot(uste_acc_themes, "RPL_THEME2", what = "prediction", main = "Predicted Likelihood of Ustekinumab Access Given Theme2")

cplot(uste_acc_themes, "RPL_THEME3", what = "prediction", main = "Predicted Likelihood of Ustekinumab Access Given Theme3")

cplot(uste_acc_themes, "RPL_THEME4", what = "prediction", main = "Predicted Likelihood of Ustekinumab Access Given Theme4")

LS0tCnRpdGxlOiAiQmlvbG9naWMgTW9kZWxzIgpvdXRwdXQ6IAogIGh0bWxfbm90ZWJvb2s6CiAgIHRoZW1lczogcGFwZXIKICAgdG9jOiB5ZXMKICAgdG9jX2Zsb2F0OiB5ZXMKZWRpdG9yX29wdGlvbnM6IAogIGNodW5rX291dHB1dF90eXBlOiBpbmxpbmUKZGF0Z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