0

I want to run a mediation analysis to see the effect of Exposure to a pollutant (continuous) to types of Cancer (categorical with 4 levels-types of cancer) via a Blood biomarker as the mediator (continuous). So the mediation diagram would be something like this:

E -> B -> C

For the mediation variable I run the linear regression analysis:

med.fit <- lm(blood_biomarker~exposure+age+sex, data=demographics)

but when it comes to the outcome variable, I read from the docs that the only appropriate analysis is multinomial regression analysis such as:

out.fit <- multinom(cancer_type~blood_biomarker+exposure+age+sex, data=demographics)

then again the mediate function won't work with the multinom class object as input.

#this doesn't work
med.out<-mediate(med.fit,out.fit, treat="exposure", mediator="blood_biomarker")

All above models are simplified for my example. there are more confounders than age and sex

I am new to mediation analysis and I think my problem is more on the regression method required than the code itself. Is there a way to do the same analysis using glm() or lm() (or any other that produces an object recognized from mediate function) for this kind of data?

Thank you in advance.

1 Answers1

0

Your problem may be that the exposure are continuous data. Try the package medflex for continuous exposure (version 4.2).

Steen J, Loeys T, Moerkerke B, Vansteelandt S. 2017. medflex : An R Package for Flexible Mediation Analysis using Natural Effect Models. J. Stat. Softw. 76.

However, I am not sure the mediator can be continuous, it may also be a problem for the analysis.

compor
  • 2,239
  • 1
  • 19
  • 29