Hi this is my first time doing a mediation analysis. I've looked at the documentation and some examples, but I seem to be having a problem with my model. The code I'm using for this is with the mediation package and is as follow:
med.fit<-polr(nightmares_12$nightmares ~ polygenic_score$risk_score + nightmares_12$gender, Hess=T)
out.fit<-polr(PE$pliks_3C ~ nightmares_12$nightmares + polygenic_scores$risk_score + PE$gender, Hess=T)
med.out<-mediate(med.fit, out.fit, treat="polygenic_scores$risk_score", mediator="nightmares_12$nightmares", sims=1000, boot=T)
So just a few points to make about the data. First I have my data in 3 datasets but they are matched (nightmares_12, polygenic_score and PE). The variables nightmares (the mediator) and pliks_3C (the outcome) are both ordinal data (each with 3 levels), hence why I have used polr
function for the model. The variable risk_score is continuous. I must admit despite having read the documentation I was not entirely sure what to include in the mediate
function, so this is possibly where I am going wrong.
The model runs fine but the problem I have is with the output in summary(med.out)
. The output looks like this:
Causal Mediation Analysis
Nonparametric Bootstrap Confidence Intervals with the Percentile Method
Pr(Y=0) Pr(Y=1) Pr(Y=2)
ACME (control) 0 0 0
2.5% 0 0 0
97.5% 0 0 0
p-value 1 1 1
Pr(Y=0) Pr(Y=1) Pr(Y=2)
ACME (treated) 0 0 0
2.5% 0 0 0
97.5% 0 0 0
p-value 1 1 1
Pr(Y=0) Pr(Y=1) Pr(Y=2)
ADE (control) 0 0 0
2.5% 0 0 0
97.5% 0 0 0
p-value 1 1 1
Pr(Y=0) Pr(Y=1) Pr(Y=2)
ADE (treated) 0 0 0
2.5% 0 0 0
97.5% 0 0 0
p-value 1 1 1
Pr(Y=0) Pr(Y=1) Pr(Y=2)
Total Effect 0 0 0
2.5% 0 0 0
97.5% 0 0 0
p-value 1 1 1
Sample Size Used: 3155
Simulations: 1000
Does anyone know why the output looks like this and what I need to change in my model to correct this problem?
Thanks!