title: R mediation analysis with ordinal data
body: <p>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:</p>
  
  <pre><code>med.fit&lt;-polr(nightmares_12$nightmares ~ polygenic_score$risk_score + nightmares_12$gender, Hess=T)
  out.fit&lt;-polr(PE$pliks_3C ~ nightmares_12$nightmares + polygenic_scores$risk_score + PE$gender, Hess=T)
  med.out&lt;-mediate(med.fit, out.fit, treat="polygenic_scores$risk_score", mediator="nightmares_12$nightmares", sims=1000, boot=T)
  </code></pre>
  
  <p>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 <code>polr</code> 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 <code>mediate</code> function, so this is possibly where I am going wrong.</p>
  
  <p>The model runs fine but the problem I have is with the output in <code>summary(med.out)</code>. The output looks like this:</p>
  
  <pre><code>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 
  </code></pre>
  
  <p>Does anyone know why the output looks like this and what I need to change in my model to correct this problem?</p>
  
  <p>Thanks!</p>