Can I know how to mediation effect calculation in the 'blavaan' library?
set.seed(1234)X <- rnorm(100)M <- 0.5*X + rnorm(100)Y <- 0.7*M + rnorm(100)Data <- data.frame(X = X, Y = Y, M = M)model <- ' # direct effectY ~ c*X# mediatorM ~ a*XY ~ b*M# indirect effect (a*b)ab := a*b# total effecttotal := c + (a*b)'fit <- bsem(model, data = Data, # jagcontrol=list(method="rjparallel"),n.chains = 3, burnin = 1000, sample = 1000,jagfile = "path/to/directory")
aparently blavaan doesnt translate the define parameters into JAGS yet.
Can you explain easier? Your codes doesn't works well.
Can you explain easier? Your codes doesn't works well.Could you be more specific? Try setting "jagfile = FALSE" if you don't understand what that argument does.
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/Ws6h7rR4Zh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.