mediation analysis in R lavaan, interpretation

585 views
Skip to first unread message

melissa de regge

unread,
Jan 16, 2020, 10:16:20 AM1/16/20
to lavaan
Trying to find my way in R lavaan mediation analysis

model1: 
X= admq (administrative quality)
M (mediator)= wt (waiting time)
Y= pt (patient satisfaction)

input in R
my.model='
 
#measurement model
interperq=~IP2+IP3+IP4+IP5+IP6+IP6+IP7+IP8+IP9
techq=~TQ1+TQ2+TQ3+TQ4
environq=~EV5+EV6+EV9+EV11
admq=~AQ6+AQ7+AQ8+AQ9
wt=~WT7r+WT8r
pt=~PT1+PT2+PT3
bi =~BI1+BI2+BI3+BI4
 
#structural model
pt~b*wt+c*admq 
wt~a*admq
indirect:= a*b
total:= c+(a*b)'
fit = sem(my.model, data=voor_R, se="bootstrap")
summary(fit)
 
After running in R lavaan (fit is ok)
 
Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  pt ~                                                
    wt         (b)    0.041    0.044    0.919    0.358
    admq       (c)    0.740    0.168    4.393    0.000
  wt ~                                                
    admq       (a)    0.559    0.255    2.189    0.029
 
 
 
Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    indirect          0.023    0.026    0.867    0.386 (quanitifies effect of mediation)
    total             0.763    0.159    4.803    0.000

I believe there is no mediation effect as the indirect effect is not significant? 
And what do we have to report in a mediation results table?
+ Do you first calculate the main effects without the mediation analyses to report? (seems logic)

Model 2 (sorry...)

X= wt
M= PT
Y= BI (behavioral intensions)

mediation.model='
 
#measurement model
interperq=~IP2+IP3+IP4+IP5+IP6+IP6+IP7+IP8+IP9
techq=~TQ1+TQ2+TQ3+TQ4
environq=~EV5+EV6+EV9+EV11
admq=~AQ6+AQ7+AQ8+AQ9
wt=~WT7r+WT8r
pt=~PT1+PT2+PT3
bi =~BI1+BI2+BI3+BI4
 
#structural model
bi~b*pt+c*wt
pt~a*wt
indirect:= a*b
total:= c+(a*b)'
fit = sem(mediation.model, data=voor_R, se="bootstrap")
summary(fit)
 
Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  bi ~                                                
    pt         (b)    0.859    0.087    9.815    0.000
    wt         (c)    0.018    0.044    0.402    0.688
  pt ~                                                
    wt         (a)    0.141    0.066    2.130    0.033
 
Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    indirect          0.121    0.054    2.237    0.025
    total             0.139    0.074    1.882    0.060

there is a mediation effect?
If yes, I believe it is a full mediation because Y on X is non significant



Terrence Jorgensen

unread,
Jan 17, 2020, 5:40:10 AM1/17/20
to lavaan
I believe there is no mediation effect as the indirect effect is not significant? 

Not unless you are using a very large alpha level for criterion.
 
And what do we have to report in a mediation results table?
+ Do you first calculate the main effects without the mediation analyses to report? (seems logic)

I would agree direct (not "main", this is not moderation) effects are relevant to report.  Also report the indirect effect you just reported.  

there is a mediation effect?

Can't know the population value, but if you are asking whether the sample estimate is significant, that depends on your alpha level.
 
If yes, I believe it is a full mediation because Y on X is non significant

Sounds like you already understand how to interpret the output.

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

Reply all
Reply to author
Forward
0 new messages