### Mediator model

Call:
lm(formula = bili ~ trt + age + male + stage, data = data)

Residuals:
   Min     1Q Median     3Q    Max 
-2.963 -1.808 -1.136  0.187 25.096 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)  
(Intercept) -0.736248   1.705548  -0.432   0.6665  
trt          0.568502   0.537608   1.057   0.2916  
age          0.006127   0.026304   0.233   0.8161  
male         0.337307   0.753642   0.448   0.6550  
stage        0.727713   0.312232   2.331   0.0208 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.704 on 191 degrees of freedom
Multiple R-squared:  0.04002,	Adjusted R-squared:  0.01992 
F-statistic: 1.991 on 4 and 191 DF,  p-value: 0.09755

### Outcome model

Call:
glm(formula = spiders ~ trt + bili + trt:bili + age + male + 
    stage, family = binomial(link = "logit"), data = data)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.9076  -0.7596  -0.5007   0.9171   2.2592  

Coefficients:
            Estimate Std. Error z value  Pr(>|z|)    
(Intercept) -3.26554    1.05861  -3.085   0.00204 ** 
trt         -0.16094    0.38343  -0.420   0.67468    
bili         0.15965    0.12465   1.281   0.20026    
age         -0.01226    0.01488  -0.824   0.40986    
male        -1.30553    0.58575  -2.229   0.02583 *  
stage        0.94331    0.21367   4.415 0.0000101 ***
trt:bili    -0.04212    0.06929  -0.608   0.54323    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 332.32  on 275  degrees of freedom
Residual deviance: 283.20  on 269  degrees of freedom
AIC: 297.2

Number of Fisher Scoring iterations: 4

### Mediation analysis 
             est         se          Z         p       lower     upper  exp(est) exp(lower) exp(upper)
cde  -0.26389664 0.39750396 -0.6638843 0.5067644 -1.04299008 0.5151968 0.7680529  0.3523994   1.673968
pnde -0.35467044 0.36397412 -0.9744386 0.3298388 -1.06804660 0.3587057 0.7014046  0.3436792   1.431475
tnie  0.04281837 0.05258023  0.8143436 0.4154481 -0.06023698 0.1458737 1.0437483  0.9415414   1.157050
tnde -0.38915459 0.36590304 -1.0635457 0.2875346 -1.10631137 0.3280022 0.6776295  0.3307768   1.388192
pnie  0.07730252 0.08188529  0.9440343 0.3451521 -0.08318969 0.2377947 1.0803689  0.9201766   1.268449
te   -0.31185207 0.36346940 -0.8579871 0.3908996 -1.02423900 0.4005349 0.7320898  0.3590696   1.492623
pm   -0.11453563 0.21395991 -0.5353135 0.5924331 -0.53388934 0.3048181        NA         NA         NA

Evaluated at:
avar: trt
 a1 (intervened value of avar) = 2.3
 a0 (reference value of avar)  = 1.1
mvar: bili
 m_cde (intervend value of mvar for cde) = 1.4
cvar: age male stage
 c_cond (covariate vector value) = 50 1 2

Note that effect estimates can vary over m_cde and c_cond values when interaction = TRUE.

### Re-evaluation at c_cond = cmean
             est         se          Z         p       lower     upper  exp(est) exp(lower) exp(upper)
cde  -0.26389664 0.39750396 -0.6638843 0.5067644 -1.04299008 0.5151968 0.7680529  0.3523994   1.673968
pnde -0.37790923 0.36214679 -1.0435250 0.2967052 -1.08770389 0.3318854 0.6852927  0.3369894   1.393593
tnie  0.04281837 0.05258023  0.8143436 0.4154481 -0.06023698 0.1458737 1.0437483  0.9415414   1.157050
tnde -0.41239338 0.36962991 -1.1156927 0.2645537 -1.13685468 0.3120679 0.6620638  0.3208265   1.366247
pnie  0.07730252 0.08188529  0.9440343 0.3451521 -0.08318969 0.2377947 1.0803689  0.9201766   1.268449
te   -0.33509085 0.36486382 -0.9183998 0.3584096 -1.05021081 0.3800291 0.7152731  0.3498640   1.462327
pm   -0.10529527 0.19606320 -0.5370476 0.5912347 -0.48957208 0.2789815        NA         NA         NA
