r – Path analysis – model writing check (Rstudio- lavaan package)

Below you will find the Figure of the path model that I wrote in Rstudio.

enter image description here

model2 <- ‘

  • #direct effect
  • INT ~ e*PN
  • PN ~ d*AR
  • AR ~ c*AC
  • AC ~ b*PB
  • PB ~ a*BV
  • #indirect effect
  • ed := e * d
  • edc := e * d * c
  • edcb := e * d * c * b
  • edcba := e * d * c * b * a
  • totalind:= ed + edc + edcb + edcba
  • total:= e + ed + edc + edcb + edcba

fit_model <-lavaan::sem(model2, data = Data, estimator=”MLR”)
summary(fit_model, fit.measures=TRUE, ci=TRUE

I am wondering if you agree with how I wrote the model, particularly, the totalind that corresponds to the sum of all indirect effects and the total.

Thanks in advance,
MarĂ­a

Read more here: Source link