Lavaan.survey output help: what am I looking at?

85 views
Skip to first unread message

H. Kberg

unread,
Jan 5, 2020, 12:43:53 PM1/5/20
to lavaan
Hi all,

Im new with mediation analysis. Currently Im trying to do a really simple one with weighted survey data, so Im using lavaan,survey.

I have one mediator.

What does this output exactly telling me?

Cheers

My code is:

#Define model
modellvm <- ' # direct effect
LVMass ~ c*METquantthird
# mediator
ATPIIImets ~ a*METquantthird
LVMass ~ b*ATPIIImets
# indirect effect (a*b)
ab := a*b
# total effect
total := c + (a*b)'

fitlvm <- lavaan(modellvm, data = finalNEOtrailMET, ordered=c("ATPIIImets"), auto.var = T, std.lv = T, meanstructure = T, int.ov.free = T)
fitlvm.surv <- lavaan.survey(lavaan.fit = fitlvm, survey.design=designweightsMET)
summary(fitlvm.surv)

with output:

lavaan 0.6-5 ended normally after 39 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of free parameters                          7
                                                      
  Number of observations                           916
                                                      
Model Test User Model:
                                              Standard      Robust
  Test Statistic                                 0.000       0.000
  Degrees of freedom                                 0           0

Parameter Estimates:

  Information                                 Expected
  Information saturated (h1) model          Structured
  Standard errors                           Robust.sem

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)
  LVMass ~                                            
    METqntthrd (c)    5.858    1.390    4.214    0.000
  ATPIIImets ~                                        
    METqntthrd (a)   -0.059    0.020   -2.908    0.004
  LVMass ~                                            
    ATPIIImets (b)   11.258    2.322    4.849    0.000

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)
   .LVMass           85.395    3.089   27.646    0.000
   .ATPIIImets        0.352    0.044    8.053    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .LVMass          633.419   40.489   15.644    0.000
   .ATPIIImets        0.177    0.009   20.296    0.000

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)
    ab               -0.663    0.262   -2.532    0.011
    total             5.196    1.406    3.697    0.000

H. Kberg

unread,
Jan 5, 2020, 12:50:21 PM1/5/20
to lavaan
Btw 

METquantthird = exogenous ordinal variable with 3 levels (1,2,3)
LVMass  = continuous variable
ATPIIImets = endogenous dichotome variable

Op zondag 5 januari 2020 18:43:53 UTC+1 schreef H. Kberg:

Terrence Jorgensen

unread,
Jan 6, 2020, 5:27:16 PM1/6/20
to lavaan
METquantthird = exogenous ordinal variable with 3 levels (1,2,3)
LVMass  = continuous variable
ATPIIImets = endogenous dichotome variable

If you have a binary mediator, you can't use lavaan.survey.  Well, you "can" use it like you did, by pretending the mediator and predictor variables are continuous, but the survey package does not have the functionality needed to adequately account for the categorical nature of ordered/binary variables.

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