### Mediator model

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

Residuals:
    Min      1Q  Median      3Q     Max 
-4.1854 -2.5979 -1.2638  0.5727 24.2813 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.54577    1.76354  -1.444 0.150018    
trt          0.60723    0.54646   1.111 0.267464    
age          0.02419    0.02706   0.894 0.372025    
male        -0.61583    0.84467  -0.729 0.466584    
stage        1.26164    0.32279   3.909 0.000117 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.472 on 271 degrees of freedom
Multiple R-squared:  0.06893,	Adjusted R-squared:  0.05518 
F-statistic: 5.016 on 4 and 271 DF,  p-value: 0.0006483

### Outcome model

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

Residuals:
    Min      1Q  Median      3Q     Max 
-1732.6 -1014.9  -585.4   -16.4 11992.7 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept) 2542.963    864.253   2.942  0.00354 **
trt         -243.320    324.138  -0.751  0.45351   
bili          -9.643    108.017  -0.089  0.92893   
age           -7.590     12.817  -0.592  0.55421   
male         207.641    399.528   0.520  0.60369   
stage        -10.331    158.835  -0.065  0.94819   
trt:bili      45.361     60.946   0.744  0.45736   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2113 on 269 degrees of freedom
Multiple R-squared:  0.02392,	Adjusted R-squared:  0.002149 
F-statistic: 1.099 on 6 and 269 DF,  p-value: 0.3634

### Mediation analysis 
             est         se          Z         p       lower     upper
cde  -215.777231 337.368224 -0.6395897 0.5224394 -877.006800 445.45234
pnde -224.521196 345.361276 -0.6501053 0.5156242 -901.416859 452.37447
tnie   68.995649  70.586449  0.9774631 0.3283399  -69.351249 207.34255
tnde -184.857310 327.844253 -0.5638571 0.5728514 -827.420238 457.70562
pnie   29.331763  43.182547  0.6792504 0.4969792  -55.304474 113.96800
te   -155.525547 338.804747 -0.4590418 0.6462041 -819.570648 508.51955
pm     -0.443629   1.071948 -0.4138533 0.6789816   -2.544608   1.65735

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
cde  -215.777231 337.368224 -0.6395897 0.5224394 -877.00680 445.45234
pnde -123.980802 311.247410 -0.3983352 0.6903831 -734.01452 486.05291
tnie   68.995649  70.586449  0.9774631 0.3283399  -69.35125 207.34255
tnde  -84.316916 314.992565 -0.2676791 0.7889464 -701.69100 533.05717
pnie   29.331763  43.182547  0.6792504 0.4969792  -55.30447 113.96800
te    -54.985153 314.694700 -0.1747254 0.8612954 -671.77543 561.80513
pm     -1.254805   7.495772 -0.1674017 0.8670540  -15.94625  13.43664
