percentage :discont_before_day3=ifelse(Discont_Day<3,1,0)

gmodels::CrossTable(final_master$discont_before_day3)
## Registered S3 method overwritten by 'gdata':
##   method         from     
##   reorder.factor DescTools
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  243 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       154 |        89 | 
##           |     0.634 |     0.366 | 
##           |-----------|-----------|
## 
## 
## 
## 

percentage :pc_change_before_day3 =ifelse( (dosechange_terli_day1==1 | dosechange_terli_day2==1 | dosechange_terli_day3==1) & Discont_Day>3 ,1,0 )

gmodels::CrossTable(final_master$pc_change_before_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  243 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       206 |        37 | 
##           |     0.848 |     0.152 | 
##           |-----------|-----------|
## 
## 
## 
## 

percentage : pc_nochange_after_day3 =ifelse(dosechange_terli_day1==0 & dosechange_terli_day2==0 & dosechange_terli_day3==0 & Discont_Day>3 ,1,0 )

gmodels::CrossTable(final_master$pc_nochange_after_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  243 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       171 |        72 | 
##           |     0.704 |     0.296 | 
##           |-----------|-----------|
## 
## 
## 
## 

hrs_responders_cat_2: %>% filter(!is.na(new_var))

new <- final_master %>% mutate(new_var=case_when(pc_nochange_after_day3==1 ~ "group B:pc_nochange_after_day3",
                                                 pc_change_before_day3 ==1 ~ "group A:pc_change_before_day3")
                               ) %>% filter(!is.na(new_var))
table1(~new_var|hrs_responders_cat_2,new)
0
(N=31)
1
(N=78)
Overall
(N=109)
new_var
group A:pc_change_before_day3 15 (48.4%) 22 (28.2%) 37 (33.9%)
group B:pc_nochange_after_day3 16 (51.6%) 56 (71.8%) 72 (66.1%)
chisq.test(new$new_var,new$hrs_responders_cat_2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  new$new_var and new$hrs_responders_cat_2
## X-squared = 3.1799, df = 1, p-value = 0.07455

ckd_baseline

final_master$pc_change_before_day3 <- as.factor(final_master$pc_change_before_day3)
table1(~pc_change_before_day3|ckd_baseline,final_master %>% filter(!is.na(ckd_baseline)))
## Warning in table1.formula(~pc_change_before_day3 | ckd_baseline, final_master
## %>% : Terms to the right of '|' in formula 'x' define table columns and are
## expected to be factors with meaningful labels.
0
(N=127)
1
(N=89)
Overall
(N=216)
pc_change_before_day3
0 105 (82.7%) 79 (88.8%) 184 (85.2%)
1 22 (17.3%) 10 (11.2%) 32 (14.8%)
chisq.test(final_master$pc_change_before_day3,final_master$ckd_baseline)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  final_master$pc_change_before_day3 and final_master$ckd_baseline
## X-squared = 1.0918, df = 1, p-value = 0.2961

percentage : pc_day3=ifelse( Discont_Day==3 ,1,0 )

gmodels::CrossTable(final_master$pc_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  243 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       203 |        40 | 
##           |     0.835 |     0.165 | 
##           |-----------|-----------|
## 
## 
## 
## 

pc_change_before_day3

table1(~ Discont_Day | pc_change_before_day3, data = final_master,render.continuous = c(.="Mean (SD)", .="Median [Q1, Q3]"))
0
(N=206)
1
(N=37)
Overall
(N=243)
Discont_Day
Mean (SD) 3.53 (2.76) 6.76 (2.68) 4.02 (2.98)
Median [Q1, Q3] 3.00 [1.25, 4.00] 6.00 [4.00, 8.00] 3.00 [2.00, 5.00]

pc_nochange_after_day3

table1(~ Discont_Day |pc_nochange_after_day3 , data = final_master,render.continuous = c(.="Mean (SD)", .="Median [Q1, Q3]") )
## Warning in table1.formula(~Discont_Day | pc_nochange_after_day3, data =
## final_master, : Terms to the right of '|' in formula 'x' define table columns
## and are expected to be factors with meaningful labels.
0
(N=171)
1
(N=72)
Overall
(N=243)
Discont_Day
Mean (SD) 3.04 (2.48) 6.38 (2.75) 4.02 (2.98)
Median [Q1, Q3] 2.00 [1.00, 3.00] 5.50 [4.00, 8.00] 3.00 [2.00, 5.00]

percentage final_master_hrs_responders_group_1 :discont_before_day3=ifelse(Discont_Day<3,1,0)

gmodels::CrossTable(final_master_hrs_responders_group_1$discont_before_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  134 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       104 |        30 | 
##           |     0.776 |     0.224 | 
##           |-----------|-----------|
## 
## 
## 
## 

percentage final_master_hrs_responders_group_1 :pc_change_before_day3 =ifelse( (dosechange_terli_day1==1 | dosechange_terli_day2==1 | dosechange_terli_day3==1) & Discont_Day>3 ,1,0 )

gmodels::CrossTable(final_master_hrs_responders_group_1$pc_change_before_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  134 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       112 |        22 | 
##           |     0.836 |     0.164 | 
##           |-----------|-----------|
## 
## 
## 
## 

percentage final_master_hrs_responders_group_1 : pc_nochange_after_day3 =ifelse(dosechange_terli_day1==0 & dosechange_terli_day2==0 & dosechange_terli_day3==0 & Discont_Day>3 ,1,0 )

gmodels::CrossTable(final_master_hrs_responders_group_1$pc_nochange_after_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  134 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        78 |        56 | 
##           |     0.582 |     0.418 | 
##           |-----------|-----------|
## 
## 
## 
## 

percentage final_master_hrs_responders_group_1 : pc_day3=ifelse( Discont_Day==3 ,1,0 )

gmodels::CrossTable(final_master_hrs_responders_group_1$pc_day3)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  134 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |       110 |        24 | 
##           |     0.821 |     0.179 | 
##           |-----------|-----------|
## 
## 
## 
## 

pc_change_before_day3

table1(~ Discont_Day | pc_change_before_day3, data = final_master_hrs_responders_group_1,render.continuous = c(.="Mean (SD)", .="Median [Q1, Q3]"))
## Warning in table1.formula(~Discont_Day | pc_change_before_day3, data =
## final_master_hrs_responders_group_1, : Terms to the right of '|' in formula 'x'
## define table columns and are expected to be factors with meaningful labels.
0
(N=112)
1
(N=22)
Overall
(N=134)
Discont_Day
Mean (SD) 4.48 (3.16) 6.59 (2.77) 4.83 (3.18)
Median [Q1, Q3] 4.00 [2.00, 6.00] 6.00 [4.00, 7.75] 4.00 [3.00, 6.00]

pc_nochange_after_day3

table1(~ Discont_Day |pc_nochange_after_day3 , data = final_master_hrs_responders_group_1,render.continuous = c(.="Mean (SD)", .="Median [Q1, Q3]") )
## Warning in table1.formula(~Discont_Day | pc_nochange_after_day3, data =
## final_master_hrs_responders_group_1, : Terms to the right of '|' in formula 'x'
## define table columns and are expected to be factors with meaningful labels.
0
(N=78)
1
(N=56)
Overall
(N=134)
Discont_Day
Mean (SD) 3.45 (2.61) 6.75 (2.92) 4.83 (3.18)
Median [Q1, Q3] 3.00 [2.00, 4.00] 6.00 [4.00, 8.25] 4.00 [3.00, 6.00]

#1 Univariate logistic regression outcome hrs_responders_cat_2: aclf_grade_new 3 lvls

table(final_master$hrs_responders_cat_2,final_master$aclf_grade)
##    
##      0  1  2  3
##   0  0 19 31 59
##   1  2 28 54 50
  final_master %>% 
    select(sbp_previous_comp,refascites_previous_comp,scr_terli_day0,tbili_admit,aclf_grade_3,hrs_responders_cat_2) %>%
    tbl_uvregression(
      method = glm,
      method.args = list(family = binomial),
      y = hrs_responders_cat_2,
      pvalue_fun = ~style_pvalue(.x, digits = 3),
      exponentiate = TRUE
    ) %>%
    bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
    bold_labels() 
Characteristic N OR1 95% CI1 p-value
sbp_previous_comp 241


    0
— —
    1
2.32 1.17, 4.82 0.019
refascites_previous_comp 204


    0
— —
    1
1.90 1.09, 3.34 0.025
scr_terli_day0 243 0.73 0.56, 0.95 0.021
tbili_admit 235 0.96 0.94, 0.99 0.002
aclf_grade_3 243


    0
— —
    1
0.50 0.30, 0.84 0.009
1 OR = Odds Ratio, CI = Confidence Interval

#1 Multivariate logistic regression outcome hrs_responders_cat_2

glm(
  hrs_responders_cat_2 ~ sbp_previous_comp + refascites_previous_comp +
    scr_terli_day0 + tbili_admit +aclf_grade_3,
  data = final_master,
  family = binomial
) %>% tbl_regression(pvalue_fun = ~style_pvalue(.x, digits = 3),
      exponentiate = TRUE) %>%
    bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
    bold_labels() 
Characteristic OR1 95% CI1 p-value
sbp_previous_comp


    0 — —
    1 2.03 0.94, 4.64 0.078
refascites_previous_comp


    0 — —
    1 1.53 0.82, 2.84 0.179
scr_terli_day0 0.82 0.59, 1.13 0.222
tbili_admit 0.98 0.95, 1.01 0.147
aclf_grade_3


    0 — —
    1 0.86 0.45, 1.67 0.651
1 OR = Odds Ratio, CI = Confidence Interval

#2 Univariate logistic regression outcome HRS_reversal_new

  final_master %>% 
    select(scr_terli_day0,sodium_admit,sbp_previous_comp,refascites_previous_comp,hcc_previous_comp,clif_c_score,HRS_reversal_new) %>%
    tbl_uvregression(
      method = glm,
      method.args = list(family = binomial),
      y = HRS_reversal_new,
      pvalue_fun = ~style_pvalue(.x, digits = 3),
      exponentiate = TRUE
    ) %>%
    bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
    bold_labels() 
Characteristic N OR1 95% CI1 p-value
scr_terli_day0 243 0.35 0.23, 0.51 <0.001
sodium_admit 234 0.94 0.90, 0.98 0.003
sbp_previous_comp 241


    0
— —
    1
2.58 1.33, 5.03 0.005
refascites_previous_comp 204


    0
— —
    1
2.11 1.15, 3.96 0.018
hcc_previous_comp 242


    0
— —
    1
3.02 1.19, 7.82 0.020
clif_c_score 234 0.94 0.90, 0.97 <0.001
1 OR = Odds Ratio, CI = Confidence Interval

#2 Multivariate logistic regression outcome HRS_reversal_new

glm(
  HRS_reversal_new ~ scr_terli_day0+sodium_admit+sbp_previous_comp+refascites_previous_comp+hcc_previous_comp+clif_c_score,
  data = final_master,
  family = binomial
) %>% tbl_regression(pvalue_fun = ~style_pvalue(.x, digits = 3),
      exponentiate = TRUE) %>%
    bold_p(0.05) %>%        # bold p-values under a given threshold (default 0.05)
    bold_labels() 
Characteristic OR1 95% CI1 p-value
scr_terli_day0 0.43 0.26, 0.67 <0.001
sodium_admit 0.95 0.90, 1.00 0.044
sbp_previous_comp


    0 — —
    1 3.59 1.54, 8.61 0.003
refascites_previous_comp


    0 — —
    1 1.24 0.60, 2.56 0.564
hcc_previous_comp


    0 — —
    1 2.16 0.64, 7.22 0.207
clif_c_score 0.95 0.91, 1.00 0.044
1 OR = Odds Ratio, CI = Confidence Interval

#3.1 Unviariate cmp: time_to_death_status_90days_cmp failcode=1 :

## 10 cases omitted due to missing values
## 8 cases omitted due to missing values
Characteristic N HR1 95% CI1 p-value
hrs_responders_cat_2 243


    0
— —
    1
0.56 0.38, 0.83 0.004
scr_terli_day0 243 1.04 0.85, 1.26 0.710
akin 233


    1
— —
    2
1.40 0.80, 2.46 0.240
    3
1.50 0.89, 2.53 0.130
tbili_admit 235 1.01 1.00, 1.03 0.067
aclf_grade_3 243


    0
— —
    1
1.93 1.31, 2.86 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval

#3.1 Multiviariate cmp: time_to_death_status_90days_cmp failcode=1

## 18 cases omitted due to missing values
Characteristic N HR1 95% CI1 p-value
hrs_responders_cat_2 225


    0
— —
    1
0.59 0.39, 0.90 0.015
scr_terli_day0 225 0.87 0.67, 1.12 0.3
akin 225


    1
— —
    2
1.40 0.79, 2.48 0.2
    3
1.67 0.92, 3.03 0.090
tbili_admit 225 1.0 0.98, 1.01 0.6
aclf_grade_3 225


    0
— —
    1
2.01 1.24, 3.24 0.004
1 HR = Hazard Ratio, CI = Confidence Interval

#3.2 Unviariate cmp: time_to_death_status_90days_cmp failcode=1

## 10 cases omitted due to missing values
## 8 cases omitted due to missing values
Characteristic N HR1 95% CI1 p-value
HRS_reversal_new 243


    0
— —
    1
0.66 0.42, 1.02 0.059
scr_terli_day0 243 1.04 0.85, 1.26 0.710
akin 233


    1
— —
    2
1.40 0.80, 2.46 0.240
    3
1.50 0.89, 2.53 0.130
tbili_admit 235 1.01 1.00, 1.03 0.067
aclf_grade_3 243


    0
— —
    1
1.93 1.31, 2.86 <0.001
1 HR = Hazard Ratio, CI = Confidence Interval

#3.2 Multiviariate cmp: time_to_death_status_90days_cmp failcode=1

## 18 cases omitted due to missing values
Characteristic N HR1 95% CI1 p-value
HRS_reversal_new 225


    0
— —
    1
0.62 0.37, 1.02 0.061
scr_terli_day0 225 0.82 0.62, 1.08 0.2
akin 225


    1
— —
    2
1.42 0.80, 2.54 0.2
    3
1.70 0.93, 3.10 0.086
tbili_admit 225 1.00 0.98, 1.02 0.8
aclf_grade_3 225


    0
— —
    1
1.98 1.23, 3.18 0.005
1 HR = Hazard Ratio, CI = Confidence Interval

#4.1 Unviariate cmp: time_to_death_status_90days_cmp failcode=1:

Characteristic N HR1 95% CI1 p-value
hrs_responders_cat_2 243


    0
— —
    1
0.56 0.38, 0.83 0.004
age 243 1.01 0.99, 1.03 0.410
race_2 243 1.06 0.62, 1.80 0.830
hispanic 243


    0
— —
    1
0.76 0.43, 1.36 0.360
admit_meld_3 243 1.02 1.00, 1.05 0.070
center 243 1.04 0.96, 1.13 0.350
1 HR = Hazard Ratio, CI = Confidence Interval

#4.1 Multiviariate cmp: time_to_death_status_90days_cmp failcode=1

Characteristic N HR1 95% CI1 p-value
hrs_responders_cat_2 243


    0
— —
    1
0.57 0.38, 0.85 0.005
age 243 1.02 1.00, 1.04 0.10
race_2 243 1.12 0.64, 1.96 0.7
hispanic 243


    0
— —
    1
0.85 0.49, 1.50 0.6
admit_meld_3 243 1.03 1.00, 1.06 0.049
center 243 1.04 0.96, 1.13 0.4
1 HR = Hazard Ratio, CI = Confidence Interval

#4.2 Unviariate cmp: time_to_death_status_90days_cmp failcode=1

## 2 cases omitted due to missing values
Characteristic N HR1 95% CI1 p-value
HRS_reversal_new 243


    0
— —
    1
0.66 0.42, 1.02 0.059
race 241


    1
— —
    2
0.67 0.24, 1.83 0.430
    3
0.00 0.00, 0.00 <0.001
    4
1.38 0.76, 2.49 0.280
hispanic 243


    0
— —
    1
0.76 0.43, 1.36 0.360
admit_meld_3 243 1.02 1.00, 1.05 0.070
center 243 1.04 0.96, 1.13 0.350
1 HR = Hazard Ratio, CI = Confidence Interval

#4.2 Multiviariate cmp: time_to_death_status_90days_cmp failcode=1

Characteristic N HR1 95% CI1 p-value
HRS_reversal_new 243


    0
— —
    1
0.73 0.46, 1.15 0.2
age 243 1.01 0.99, 1.03 0.2
race_2 243 1.14 0.66, 1.97 0.6
hispanic 243


    0
— —
    1
0.79 0.44, 1.40 0.4
admit_meld_3 243 1.03 1.00, 1.06 0.063
center 243 1.03 0.94, 1.12 0.5
1 HR = Hazard Ratio, CI = Confidence Interval

#5 survived_day3 Multiviariate cmp: time_to_death_status_90days_cmp failcode=1

Characteristic N HR1 95% CI1 p-value
hrs_responders_cat_2 236


    0
— —
    1
0.61 0.40, 0.92 0.019
age 236 1.02 1.00, 1.04 0.056
race_2 236 1.14 0.64, 2.01 0.7
hispanic 236


    0
— —
    1
0.84 0.47, 1.51 0.6
admit_meld_3 236 1.04 1.01, 1.07 0.018
1 HR = Hazard Ratio, CI = Confidence Interval

Plot 1 scr hrs_responders_cat_2

risk table HRS Responders

hrs_responders_cat_2 n_baseline_scr n_last_scr n_scr_terli_day0 n_scr_terli_day1 n_scr_terli_day2 n_scr_terli_day3 n_scr_day1_post_terli n_scr_day2_post_terli n_scr_day3_post_terli n_dc_scr
0 109 107 109 108 74 49 95 90 87 87
1 133 132 134 133 116 103 115 103 98 118

Plot 1 scr HRS_reversal_new

# risk table HRS Reversal
HRS_reversal_new n_baseline_scr n_last_scr n_scr_terli_day0 n_scr_terli_day1 n_scr_terli_day2 n_scr_terli_day3 n_scr_day1_post_terli n_scr_day2_post_terli n_scr_day3_post_terli n_dc_scr
0 167 165 168 166 119 87 143 133 129 137
1 75 74 75 75 71 65 67 60 56 68

any_ae

0
(N=201)
1
(N=42)
Overall
(N=243)
totalalbumin_before_terli
Mean (SD) 237 (171) 302 (238) 247 (184)
Median [Q1, Q3] 200 [113, 350] 225 [175, 359] 200 [125, 350]
Missing 17 (8.5%) 8 (19.0%) 25 (10.3%)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  totalalbumin_before_terli by any_ae
## W = 2616.5, p-value = 0.1301
## alternative hypothesis: true location shift is not equal to 0

any_ae no missing

0
(N=201)
1
(N=42)
Overall
(N=243)
totalalbumin_before_terli
Mean (SD) 217 (177) 244 (245) 222 (190)
Median [Q1, Q3] 188 [75.0, 325] 200 [87.5, 331] 188 [75.0, 325]
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  totalalbumin_before_terli by any_ae
## W = 4156.5, p-value = 0.8771
## alternative hypothesis: true location shift is not equal to 0

terli_ae_respfail

0
(N=220)
1
(N=23)
Overall
(N=243)
totalalbumin_before_terli
Mean (SD) 239 (172) 329 (270) 247 (184)
Median [Q1, Q3] 200 [125, 350] 250 [179, 394] 200 [125, 350]
Missing 22 (10.0%) 3 (13.0%) 25 (10.3%)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  totalalbumin_before_terli by terli_ae_respfail
## W = 1567.5, p-value = 0.1251
## alternative hypothesis: true location shift is not equal to 0

terli_ae_respfail no mssing

0
(N=220)
1
(N=23)
Overall
(N=243)
totalalbumin_before_terli
Mean (SD) 215 (178) 286 (276) 222 (190)
Median [Q1, Q3] 188 [75.0, 321] 225 [93.8, 369] 188 [75.0, 325]
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  totalalbumin_before_terli by terli_ae_respfail
## W = 2194.5, p-value = 0.2958
## alternative hypothesis: true location shift is not equal to 0