Mediation analysis

Helo everyone

I am struggeling to run a mediation analysis. My output says there are 0 observations, while my dataset shows that there are 105 obs of 20 variables. This is my output, can anyone help me? Thankyou!

mediatietastbaar<-'trots~a*conditie

  • groengedrag~conditie+b*trots
  • ab:=a*b'

fitmediatietastbaar<-sem(mediatietastbaar)
summary(fitmediatietastbaar)
lavaan 0.6-7 did not run (perhaps do.fit = FALSE)?
** WARNING ** Estimates below are simply the starting values

Estimator ML
Optimization method NLMINB
Number of free parameters 0

Number of observations 0

Parameter Estimates:

Regressions:
Estimate
trots ~
conditie (a) 0.000
groengedrag ~
conditie 0.000
trots (b) 0.000

Variances:
Estimate
.trots 1.000
.groengedrag 1.000

Defined Parameters:
Estimate
ab 0.000

Welkom in this group.

You provide us with very little information to help you: which packages, functions??

Could I ask you to provide a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help. A reprex consists of the minimal code and data needed to recreate the issue/question you’re having. You can find instructions how to build and share one here:

https://community.rstudio.com/t/faq-whats-a-reproducible-example-reprex-and-how-do-i-do-one/5219

https://community.rstudio.com/t/faq-how-to-do-a-minimal-reproducible-example-reprex-for-beginners/23061

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.