Auxiliary Variables in Lavaan:
Important Addition for FIML (Missing Data)

by Arndt Regorz, MSc.
September 17, 2026

The new lavaan version 0.7-2 has added an option for including auxiliary variables in your models. This blog post tells you why and when you should use this option and how to do that with lavaan.

Why to Use Auxiliary Variables

If you estimate an SEM, a CFA or a path model, you often have missing data. The most common choice to deal with that is requesting full information maximum likelihood estimation. The crucial assumption for that is that the missing data mechanism is at least MAR (missing at random). In MAR the probability of missing data is systematically related to observed data, but unrelated to the unobserved data.

In the context of a lavaan model this means: If the missingness depends on other variables in your lavaan model, then you are OK, you have MAR, and FIML will produce correct results. But this does apply to the variables in your models, not to all variables in your dataset.

Example:
In addition to your CFA you have a variable "age" in your dataset. This variable is not part of your CFA, but the missingness depends (at least in part) on the age of the participant. In this case you have missing not at random (MNAR) because the missingness depends on a variable not in your model.

And here the concept of auxiliary variables comes into play. If you include "age" as an auxiliary variable in your model, then this is part of the model and the missingness mechanism changes to MAR. Thus you get correct results.

For that reasons it is in general a good idea to include auxiliary variables in your models. Those should be (continous) variables that are not part of your substantive model and that could have an impact on the missingness in your data. By including them you increase the chance that your data is MAR and not MNAR.

How to Use Auxiliary Variables in Lavaan

It is quite easy to include (continous) auxiliary variables in your lavaan models. You simply add the parameter "aux" to the model estimation.

Example

# Model definition

Model_1 <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '

# Fit with auxiliary variable

Fit_aux <- cfa(Model_1,
missing = "ml",
aux = "age",
data = HSM)

summary(Fit_aux,
fit.measures = T,
standardized = T)

If you look at this example you can see that there is not much new. The model definition is the same as usual, the summary as well. Only in the model estimation (here with the cfa function, but it works the same with the sem function) there is one additional row:

aux = "age"

If you want to inlude more than one auxiliary variable, you simply combine them with the c() function.

aux = c("age", "income")

Doing this, you have increased the chance that the missing data mechanism in your model is MAR, leading to correct results.

The output is as always, so you will not get results for the auxiliary variables but only a note that (and which) auxiliary variables have been used:

lavaan NOTE:
auxiliary (aux) variable(s) added to the model as saturated correlates
(estimated with FIML and hidden from the output): age

References

Graham, J. W. (2009). Adding missing-data-relevant variables to FIML-based structural equation models. Structural Equation Modeling, 10(1), 80-100. https://doi.org/10.1207/S15328007SEM1001_4

Citation

Regorz, A. (2026, September 17). Auxiliary variables in lavaan: Important addition for FIML (missing data). Regorz Statistik. https://www.regorz-statistik.de/blog/lavaan_auxiliary_variables.html