Author:

| Published:

| Updated:


Structural Equation Modeling using STATA Webinar, Q&As:

Q1. If I need to design single latent construct using binary and continuous and multinomial variables, what is the best way to do that? Is that latent construct valid from the statistical standpoint?

You can certainly use -gsem- with a latent variable measured by a combination of binary, continuous, and multinomial variables.  You just need to pick an appropriate model for each variable.  Convergence will be dependent on your particular model and dataset.  You may find that an option such as -difficult- will solve the problem.  Other times, I find it best to fit a simpler model and use the results as starting values for a larger model.  For help with your specific problem, you can write to tech-support@stata.com

Q2: In several papers, it is mentioned that they perform confirmatory factor analysis. Does SEM does automatically or I need to do it outside of sem? HOW is this different from factor analysis?

Confirmatory factor analysis can be performed using SEM.  Typically this refers to fitting models with latent variables measured by observed variables like the one that Meghan just showed.  The important part is that you have a theory for how the latent variables relate to the observed variables and we can determine whether your proposed model fits well.  This is in opposition to exploratory factor analysis where all latent variables are allowed to be measured by all observed variables and you look for patterns. With confirmatory factor analysis performed by -sem-, we make assumptions about the relationship between our latent variables and observed variables and then we can explore whether the data fits this model well.  In exploratory factor analysis, on the other hand, all latent variables are allowed to load on all observed variables, and we explore the patterns in the results.

Q3: Is it possible to get the modification indices presented as sets of matrices as opposed to the listing of highest index values?

After using -estat mindices- to obtain modification indices, you can obtain the results in matrix form from the returned matrix r(mindices).  If you type “mat list r(mindices)” you will see that the modification indices are in the first column of this matrix, so depending on what you want to do with these, you may want to extract only the first column.

Q4:Hi, I have a question: Is it possible to have only one corresponding endogenous variable linked to the related latent variable or should there be always more than one?

This can work in some cases, but it typically requires some extra constraints for identification.  If you have a specific model that you are trying to fit and have questions about it, feel free to email us at tech-support@stata.com and we will be happy to help.

Q5: How can be applied SEM on panel data using macroeconomical variables? (stata commands and help file in Stata if possible).

The -gsem- command can fit random-effects models.  You can find some examples at

https://www.stata.com/bookstore/structural-equation-modeling-reference-manual/

For instance, https://www.stata.com/manuals/semexample38g.pdf and https://www.stata.com/manuals/semexample42g.pdf have a couple of examples.

Q6: How we should define our arrows in our model ? Should we first run correlation matrix and based on significant correlation draw the paths?

The arrows should be drawn based on the model you propose.  Based on theory, you would likely have an expected relationship among variables that you will specify using the arrow

Q7: What does covariance between exogenous variables mean? Does it mean we calculate their independent effects in our model?

The exogenous variables are the ones that are not predicted by any others in our model.  We can compute the observed covariances among these variables among these using -sem- or even the -correlate- command.  After fitting a model, we can also determine the covariances implied by the model.

Q8: Can we use fiml option to handle missing data with gsem in Stata 16.1?

The -gsem- command handles missing data by using all available observations for each equation.  You can read more about it in the “Treatment of missing values” section of https://www.stata.com/manuals/semintro4.pdf

Q9: Is the difference in ‘accuracy’ between SEM and gSEM a serious problem?

Generally, if you can fit the same model with -sem- and -gsem-, the results will be identical to the number of decimal places displayed in Stata’s output.  -sem- can be faster because it is optimized for the type of models it fits.

Q10: can SEM be used for time series and panel data analysis?

There are a number of models that can be fit to panel data.  One of these is to include random effects in one or more equations using -gsem-

Q11: Can you explain more about Generalized Response Variable? What type of variables fits into this ?

The -gsem- command allows for fitting models to binary, count, censored, categorical, ordinal, and survival-time outcomes.  We refer to these as generalized responses

Q12: How to measure direct and indirect effects?

estat teffects, standardized. The -estat teffects- command estimates direct and indirect effects

Q12: Multigroup SEM: Test for group invariance of parameters and model fit by group

estat ginvariant

estat ggof

Q12: With ologit or logit, can I see odds ratio?

estat eform var1 var2

Q13: Which command is better or should be used frequently? gsem or sem?

This really depends on what type of model you are fitting.  -gsem- fits a much wider range of models, but if the model you wish to fit can be fit by -sem-, I would recommend using -sem-.

Q14: Sorry but I didn’t understand when we should use vce() ?

The -vce()- option modifies the way that the standard errors are estimated.  For instance -vce(robust)- provides stanadard errors that are robust to some model assumptions.  -vce(sbentler)- provides standard errors that are robust to the normality assumption

Q15: Can the latent variable estimates be used in another  model later on? (I plan on using factor analysis to determine latent variables and then as a second step use a joint longitudinal and survival model with competing risks. Or can i do all of this using sem simultaneously i.e. factor analysis/ longitudinal mixed effects/ competing risks survival analysis) thanks!

You can use -predict- to obtain predicted values of the latent variable.  However, if you plug these into another model, that second stage model will treat these as true values rather than predictions.  In general, I would recommend fitting the full model (both the measurement portion and strucutral portion) simultaneously using -sem- or -gsem-

Q16: I am trying to fit a higher order latent model (i.e. 2 levels of latent variables and 1 level of observed vars). Stata does not seem to converge when I try this – is there a reference to diagnose a higher order CFA model?

Convergence issues are specific to your model and dataset.  Sometimes simply adding a -difficult- option is enough.  Other times it helps to start with a simpler model and using estimates from it as starting vaues for the more complex model.  You might want to take a look at 

https://www.stata.com/manuals/semintro12.pdf

Q17: This is a strange question, but is there an easy way to edit the sem model in builder (i.e., shifting font and boxes) after the command has been called? Every time I click on the matrix it assumes I want to add something new.

Make sure you have first clicked on the selection tool (at the top of the toolbar).  Then you should be able to click on one element of the path diagram and move it around.  You can also hold the shift key to click on multiple elements of the diagram and move them together

Q18: is it possible to calculate Multigroup analysis (MGA) and MICOM through stata.

Both -sem- and -gsem- have a -group()- option that allow you to perform multiple group analysis.

Q19: Do I need to create dummy variable for categorical variable in SEM.

Yes, if you are using a categorical variable as a predictor in -sem-, you will first need to create dummies.  The -gsem- command allows you to use factor variable notation.  If you are using categorical predictors in -sem-, you will want to consider where the requirement for normality is strict.  For instance, -method(mlmv)- relies on normality more heavily than standard maximum likelihood estimation.

Q20: Is it possible to get fit statistics for GSEM?

You can obtain  AIC and BIC as well as Wald and likelihood ratio tests.  However, many of the fit statistics available for -sem- are not available with -gsem- because they cannot be computed given the way the model is fit.

Q21: Is multi-level analysis only avaiable for GSEM, not SEM

Yes, you would need to use -gsem- to fit multilevel models.

Link for video and course materials: Structural equation modeling (SEM) using Stata.


Discover more from Dr. Bijesh Mishra

Subscribe to get the latest posts sent to your email.


Categories


Discover more from Bijesh Mishra, Ph.D.

Subscribe now to keep reading and get access to the full archive.

Continue Reading