My goal is to use and understand GSEM, both the builder and the syntax. I'm doing a path analysis to determine the mediation effects of a number of variables. My dependent variable is ordinal, as is the main independent variable, and there are three mediating variables that are either binary, continuous or ordinal. Using GSEM syntax, I write the model like this:
gsem (fi4<-i.sc2 i.health c.town i.retired, family(ordinal) link(logit)) (retired<-i.sc2, family(binomial) link(logit)) (town<-i.sc2) (health<-i.sc2, family(binomial) link(logit)) if sex==1 [pweight=static_weight_v3]
...where fi4 is the DV, sc2 is the 'main' IV and the other variables (health, town, retired) are mediators. Obviously, when I run this command the output reports coefficients for each level of the relationship between an IV and the DV, e.g. I get a coefficient for 1.sc2's effect on fi4, a separate one for 2.sc2 etc. However, using the GSEM builder, I can't work out how to add each categorical variable level to the plot separately, only the 'full' variable (i.e. sc2, not 1.sc2). To calculate the mediation indirect and direct effects, I need each separate path coefficient, not an overall coefficient for the ordinal variable. Am I misunderstanding something? Levels of categorical variables do not appear in the drop-down list from which I select the variable I wish to add, only the list of variables in the main data. Grateful for any help here, I realise it may be a silly question!
Related Posts with Using categorical independent variables in GSEM builder
Difference-in-difference using tobit regression with mediation (controlling for fixed effects)Dear Statalist-users, I want to conduct a mediation analysis in a difference-in-difference setting.…
metandi - save outputHi all, I'm using metandi to run multiple meta-analyses and I want to save the summary points (i.e. …
Issues with inaccurate generate of a new variableHi there, I have recently used a very simple comand to generate a new variable. gen MFN_zero = Imp…
meologit var(_cons) too small, problem?I ran an meologit for my cluster RCT data; the clustering var(_cons) comes out to be 9.90e-32, S.E 5…
matrcrename on the ssc server (?) to rename individual columns/rows of a matrixBack in 2006 Nick Cox provided an ado file to rename individual columns/rows of a matrix in this arc…
Subscribe to:
Post Comments (Atom)
0 Response to Using categorical independent variables in GSEM builder
Post a Comment