Hello Statalist members,
Thank you for your help in advance.
I am running the following GSEM in Stata 18.0 and need some help.
gsem ///
(x1 x2 x3 <- Latent) ///
(expost_outcome_variable <- Latent x7 x8 x9) ///
(observed_endogenous_variable <- Latent Latent#i.group x4 x5 x6) ///
cov(e.x1* e.observed_endogenous_variable) cov(e.x2* e.observed_endogenous_variable) cov(e.x3* e.observed_endogenous_variable) ///
method(ml) vce(robust) latent(Latent) intmethod(mvaghermite)
x1 x2 x3 are observed measurement variables
x4 x5 x6 x7 x8 x9are observed control variables
expost_outcome_variable is a variable that I measured expost which is evidence of some part of the Latent variable playing out in the future.
My questions:
1) Since I think x1 x2 and x3 might be noisy, I want to use the part of the Latent variable that maximally correlates with the expost_outcome_variable to explain my observed_endogenous_variable. How can I tell stata that the expost_outcome_variable is not part of the measurement model, i.e. it shouldn't be a measurement variable like x1 x2 x3?
2) Is it possible to interact a latent variable with a factor variable like I am doing with Latent#i.group? Or does this tell stata to calculate the latent variable for each group?
Thank you!
Best,
Thomas
Thank you for your help in advance.
I am running the following GSEM in Stata 18.0 and need some help.
gsem ///
(x1 x2 x3 <- Latent) ///
(expost_outcome_variable <- Latent x7 x8 x9) ///
(observed_endogenous_variable <- Latent Latent#i.group x4 x5 x6) ///
cov(e.x1* e.observed_endogenous_variable) cov(e.x2* e.observed_endogenous_variable) cov(e.x3* e.observed_endogenous_variable) ///
method(ml) vce(robust) latent(Latent) intmethod(mvaghermite)
x1 x2 x3 are observed measurement variables
x4 x5 x6 x7 x8 x9are observed control variables
expost_outcome_variable is a variable that I measured expost which is evidence of some part of the Latent variable playing out in the future.
My questions:
1) Since I think x1 x2 and x3 might be noisy, I want to use the part of the Latent variable that maximally correlates with the expost_outcome_variable to explain my observed_endogenous_variable. How can I tell stata that the expost_outcome_variable is not part of the measurement model, i.e. it shouldn't be a measurement variable like x1 x2 x3?
2) Is it possible to interact a latent variable with a factor variable like I am doing with Latent#i.group? Or does this tell stata to calculate the latent variable for each group?
Thank you!
Best,
Thomas