title: fit negative binomial in mediation path models with FIML and bootstrap in R
body: <p>I've been analyzing longitudinal data for mediation path models in R. But my outcome is highly positively skewed, so regular regression does not work (too skewed to fit Poisson). </p>
  
  <p>lavaan does not support negative binomial (I checked with the lavaan group where the developer of lavaan answers questions).</p>
  
  <p>I already tried dichotomizing the outcome and using lavaan. But lavaan can't use FIML for binary options (only pairwise), so I lose 1/3 of participants in that way, and I don't like losing information from dichotomizing anyway.</p>
  
  <p>I want to continue to use bootstrap instead of manually checking a, b, c, and c'.</p>
  
  <p>My collaborator and I are trying to avoid multiple imputation.</p>
  
  <p>I don't have MPlus, and I want to continue to use R. </p>
  
  <p>Any input will be greatly appreciated. </p>
  
  <p>Here is my model using lavaan:</p>
  
  <pre><code>p16a18c24 &lt;- ' 
  # direct effect
  myOutcome ~ c*myPredictor
  # mediator
  myMediator1 ~ a1*myPredictor
  myOutcome ~ b1*myMediator1
  myMediator2 ~ a2*myPredictor
  myOutcome ~ b2*myMediator2
  myMediator3 ~ a3*myPredictor
  myOutcome ~ b3*myMediator3
  # variances: any variable that was listed as DV
  myOutcome ~~ myOutcome 
  myMediator1 ~~ myMediator1
  myMediator2 ~~ myMediator2
  myMediator3 ~~ myMediator3
  # covariances: mediators who are (positively) correlated with each other 
  myMediator1 ~~ myMediator2
  myMediator2 ~~ myMediator3
  myMediator3 ~~ myMediator1
  # intercepts: *1, only for DVs 
  myOutcome ~ 1 
  myMediator1 ~ 1
  myMediator2 ~ 1
  myMediator3 ~ 1
  # indirect effects (a*b)
  ab1 := a1*b1
  ab2 := a2*b2
  ab3 := a3*b3
  # total effect
  total := c + (a1*b1) + (a2*b2) + (a3*b3)
  '
  fit.p16a18c24 &lt;- sem(p16a18c24,data=m,missing="fiml",se="bootstrap")
  summary(fit.p16a18c24,fit.measures=TRUE,standardized=TRUE,rsquare=TRUE)
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>GN</p>