R-Square Mediation

25 views
Skip to first unread message

Daniel Groß

unread,
Jul 2, 2019, 4:06:30 AM7/2/19
to lavaan
Hi all,

I calculated a simple mediation model with lavaan using the following code:

NA.    <- 'ZMHAS_12 ~ a*ZNA
          ZPMH_scale ~ b*ZMHAS_12 + c*ZNA


          indirect := a*b
          direct := c
          total := c + (a*b)'



fit
<- sem(NA., data = data, estimator = "MLR")
summary
(fit, standardized=T, fit.measures=T, rsq = T)

rsq = T gives me the R-square. Now my question is where I can see whether the R-squares are significant?
Thanks for your answers.

Daniel 

Terrence Jorgensen

unread,
Jul 2, 2019, 5:02:16 AM7/2/19
to lavaan
Now my question is where I can see whether the R-squares are significant?

The H0 that Rsq == 0 is the same as saying all its predictors have slopes == 0.  You can use a Wald test:

# test Rsq for mediator, same as Wald z from summary() but squared
lavTestWald
(fit, constraints = 'a == 0')
# test Rsq for outcome
lavTestWald
(fit, constraints = 'b == 0 ; c == 0')


Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Message has been deleted

Daniel Groß

unread,
Jul 2, 2019, 6:07:10 AM7/2/19
to lavaan
Thanks for the good and fast reply. 
Reply all
Reply to author
Forward
0 new messages