kkholst / mets

Analysis of Multivariate Event Times https://kkholst.github.io/mets/
15 stars 3 forks source link

Inquiry about the vignettes for mediation analysis in survival model #6

Closed lijiaqi-github closed 1 year ago

lijiaqi-github commented 1 year ago

Thanks you for creating the mets package.

I am trying the mediation analysis in survival model and found your vignettes Mediation Analysis for survival data

However, I am not sure which are the direct and indirect effects in your example.

For example, in the following example, which outputs are the direct and indirect effects?

## binomial regression ###########################################################
aaMss <- phreg(Surv(time,status==2)~dnr.f0+dnr.f1+preauto+ttt24+cluster(id),data=wdata,weights=wdata$weights)
summary(aaMss)
#> 
#>    n events
#>  400    194
#> 
#>  200 clusters
#> coeffients:
#>              Estimate   Std.Err      2.5%     97.5% P-value
#> (Intercept) -0.520113  0.259635 -1.028987 -0.011238  0.0452
#> dnr.f01      0.339934  0.376813 -0.398605  1.078473  0.3670
#> dnr.f11      0.274655  0.071476  0.134564  0.414747  0.0001
#> preauto      0.552689  0.365370 -0.163423  1.268800  0.1304
#> ttt24        0.300601  0.380049 -0.444282  1.045483  0.4290
#> 
#> exp(coeffients):
#>             Estimate    2.5%  97.5%
#> (Intercept)  0.59445 0.35737 0.9888
#> dnr.f01      1.40486 0.67126 2.9402
#> dnr.f11      1.31608 1.14404 1.5140
#> preauto      1.73792 0.84923 3.5566
#> ttt24        1.35067 0.64128 2.8448

Thank you very much.

scheike commented 1 year ago

I have updated the vignette to explain a bit more about the parametrization, but more details are given in the medflex package. mediation-survival.pdf

scheike commented 1 year ago

and correcting a type mediation-survival.pdf

lijiaqi-github commented 1 year ago

Thank you for your prompt response. So the dnr.f01 is the direct effect and dnr.f11 is the indirect effect, is it right?

And I have another question. If you can give me your opinion, it will be kind and helpful. In mediation analysis in a non-survival setting, direct effect + indirect effect = total effect.

Does the same relationship exist in the survival setting? For example, is the directly calculate hazard ratio equal to the product of the direct effect hazard ratio and the indirect effect hazard ratio?

directly calculated hazard ratio by summary(phreg(Surv(time,status==2)~dnr.f+preauto+ttt24+cluster(id),data=wdata))

ie, exp(dnr.f) = exp(dnr.f01) * exp(dnr.f11)

scheike commented 1 year ago

You are quite right that the interpretation depends on the scale, and the medflex package have a more careful discussion of these issues.