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.