Suitability of lavaan for particular analysis

415 views
Skip to first unread message

Thalia Theodoraki

unread,
Jun 13, 2017, 9:27:43 AM6/13/17
to lavaan

Hi there

I am totally new to using the lavaan package and my main reason for using it is that is allows me to utilise FIML to deal with my missing data. I have a relatively large dataset of 347 individuals and the first analysis I want to carry out is just a regression analysis where I plan to regress three different variables (cognitive ability constructs) on age and some other control variables such as SES, gender etc.

I do have some missing data mainly on the dependent variables (on the independent variables I am only missing info for 3 cases in the SES variable) but they do not exceed  around 12% of my data. I have conducted stepwise multiple regressions with pairwise deletion (omitted any cases that have missing data on the variables of interest) and my results are ok but of course each regression is done on slightly different numbers of degrees of freedom (according to the different sample sizes) and I am concerned whether my results (of the different regressions) are really comparable.

I would appreciate it if someone could advise me if doing the regressions in lavaan instead (with FIML) would be preferable. I know that lavaan is more commonly used for more complex models so I do not know whether it would be worth using it for merely a multiple regression and how to go about actually implementing a stepwise regression analysis in lavaan. Also if I do use lavaan what kind of extraction commands would I need to use to look at Rsquared and correlation coefficients?

Any help or advice would be greatly appreciated.

Many thanks
Thalia

Terrence Jorgensen

unread,
Jun 14, 2017, 6:28:23 AM6/14/17
to lavaan
how to go about actually implementing a stepwise regression analysis in lavaan.

There is not stepwise feature in lavaan, nor would it be consistent with analyses of covariance structure.  You cannot compare SEMs with different variables in the model, even if they are parametrically nested in a GLM.  If you wanted to compare specific hypothesized models, they all need the same set of predictors, but different predictor's effects are fixed to zero, so that the models still contain the same variables and can be compared.  For example:

## specify models
mod
.full <- ' Y ~ X1 + X2 + X3 '
mod
.fix1 <- ' Y ~ 0*X1 + X2 + X3 '
## fit models
fit
.full <- sem(mod.full, data = myData, fixed.x = FALSE, missing = "fiml")
fit
.fix1 <- sem(mod.fix1, data = myData, fixed.x = FALSE, missing = "fiml")
## compare models
anova
(fit.full, fit.fix1)
## since fit.full is saturated, this particular example identical to
anova
(fit.fix1)
## but you might need to compare 2 nested non-saturated models, too


what kind of extraction commands would I need to use to look at Rsquared and correlation coefficients?

summary(fit.full, rsquare = TRUE, standardized = TRUE)

The std.all column returns standardized coefficients (i.e., estimates if all variables had variance = 1), so covariances among predictors will be correlations, and regression slopes will be semipartial correlations between predictor and outcome, controlling for other predictor(s) with nonzero effects.

Your other questions are not really specific to lavaan.  General SEM questions can be posted on SEMNET:


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

Thalia Theodoraki

unread,
Jun 21, 2017, 10:25:10 AM6/21/17
to lavaan
Ok, so basically that means I could do hierarchical regression by keeping all the same variables in the models but fixing the necessary variables effect to 0 and comparing the models. That's great.
Thank you very much Terrence.  Just one more quick question: When requesting the partial regression coefficients which command can I use to get the standard errors based on the observed information matrix? Or does FIML in lavaan use the observed information matrix to produce standard errors by default?

Thanks again
Thalia
Message has been deleted

Terrence Jorgensen

unread,
Jun 21, 2017, 10:57:14 AM6/21/17
to lavaan

When requesting the partial regression coefficients which command can I use to get the standard errors based on the observed information matrix? Or does FIML in lavaan use the observed information matrix to produce standard errors by default?

I think lavaan uses observed information by default when missing = "fiml", but you can request it explicitly.  See the "information" argument:

?lavOptions

Thalia Theodoraki

unread,
Jun 21, 2017, 12:12:29 PM6/21/17
to lavaan
Ok, will do so. Thanks so much for all your help.

Thalia
Reply all
Reply to author
Forward
0 new messages