Moderated nonlinear factor analysis

330 views
Skip to first unread message

Elmar Schlueter

unread,
Sep 6, 2020, 3:30:41 AM9/6/20
to lavaan

Dear all,

Daniel Bauer
provides Mplus code to conduct a  moderated nonlinear factor analysis - in  brief, a cfa where in adition to  a direct effect of a  predictor on a manifest indicator of a factor the  factor loading itself can be regressed  on a predictor (or multiple predictor).

I  am wondering if such a  MIMIC model plus a moderated factor loading could  be estimated in lavaan as well (not sure if Lavaan  offers something similar to the  MODEL CONSTRAINT' command)? 
Best,
E.

***

Simplified Mplus code for  illustration:

MODEL:   

    f1 BY
    y1*             
    y2              
    y3
    y4(L) ; ! label for the factor  loading, to be used in "MODEL CONSTRAINT"

    f1 ON x1;  ! factor regressed on predictor x1

    y4 ON x1;  ! manifest indicator regressed on predictor x1
                   
MODEL CONSTRAINT:

NEW         (L0 L1);  !  2 new parameter, intercept and slope for regressing the loading  on  !x1

L =   L0 +L1*x1;   ! Moderation of the  factor loading

Terrence Jorgensen

unread,
Sep 7, 2020, 6:15:01 AM9/7/20
to lavaan
I  am wondering if such a  MIMIC model plus a moderated factor loading could  be estimated in lavaan as well

MNLFA is not MIMIC.  In MIMIC, variables are regressed on other variables.  In MNLFA, parameters are regressed on other variables (the latter of which are not even "modeled" variables).  This is a more general case of something like Mplus's TSCORES which allow a different (fixed) Lambda matrix per case in a latent curve model.

lavaan does not allow for this.  The parameters must be considered constant across cases (within each group in a multigroup model).  

It is possible in OpenMx.  See work by Dylan Molenaar on heteroskedastic latent trait models, which I think could be considered a special case of MNLFA.  My grad student is working on a tutorial article on MNLFA in OpenMx; I'll try to remember to post a link here once a preprint is available.

not sure if Lavaan  offers something similar to the  MODEL CONSTRAINT' command)?  

Yes, but it only accommodates functions of (estimated) parameters.  Adapted from the ?lavTestWald help page:

HS.model <- '
  visual =~ x1 + b1*x2 + x3
  textual =~ x4 + b2*x5 + x6
  speed =~ x7 + b3*x8 + x9

  ## model constraints
  2*b1 == b3
  b2 - b3 == 0
'

fit
<- cfa(HS.model, data=HolzingerSwineford1939)
summary
(fit)

Variables cannot be used to define constraints, because that would imply parameters vary across cases.

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

isaactp...@gmail.com

unread,
Nov 18, 2020, 11:17:33 AM11/18/20
to lavaan

I love the lavaan package. Thank you Yves, Terrence, and others for developing it.

I was wondering whether you have interest/plans to extend lavaaan to allow moderated nonlinear factor analysis? This would be particularly helpful for testing measurement invariance across many different factors simultaneously, including continuous factors. The regularization approach proposed by Bauer et al. (2020) seems to be a promising approach for testing for measurement invariance across multiple factors.

Bauer, D. J., Belzak, W. C. M., & Cole, V. T. (2020). Simplifying the assessment of measurement invariance over multiple background variables: Using regularized moderated nonlinear factor analysis to detect differential item functioning. Structural Equation Modeling27(1), 43–55. https://doi.org/10.1080/10705511.2019.1642754

Bauer, D. J. (2017). A more general model for testing measurement invariance and differential item functioning. Psychological Methods22(3), 507–526. https://doi.org/10.1037/met0000077

Message has been deleted

Maria

unread,
Aug 23, 2023, 2:59:38 AM8/23/23
to lavaan
Hi, 

I am coducting MNLFA models in OpenMx and have a question: Is it really necessary to include the same quadratic effects of the background variables on the model parameters (factor loadings and indicator intercepts)  when my primary interest lies in the effects of a background variable on the latent means in the first place? In the example from Bauer et al. (2017) and the tutorial from Kolbe et al. (2022), it is done this way but I do not really understand why the effects have to be the same.

A professional opinion would be appreaciated.

Terrence Jorgensen

unread,
Sep 15, 2023, 5:53:28 AM9/15/23
to lavaan
I do not really understand why the effects have to be the same

The model terms (predictors/moderators) are the same for each parameter, but the estimated effects can differ.  But there is nothing preventing you from fitting more restrictive models in which only a subset of parameters are moderated by particular effects (each parameter can have its own "model").
Reply all
Reply to author
Forward
0 new messages