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
Running mi:reshape after imputation (longitudinal dataset)Hi All I imputed (25 imputations) my longitudinal dataset (in the wide format) which seems to have …
please help me, what is the best model or method of estimation?hello , i have panel data unbalanced N=25 T=9 for 20 cross-section and 7 for 5 cross-section all obs…
test of proportions using prtestHi statalist, I am trying to run a two sample test of proportion using two groups (women who report…
JointPoint / test of secular trendsDear all, I've calcuted incidence rates (using Poisson with offset[logtime] and 1-year age bands and…
Not normally distributed errors after controlling for time fixed effectsHello everyone, I am running a regression where I would like to control for both region and time fix…
Subscribe to:
Post Comments (Atom)
0 Response to Using categorical independent variables in GSEM builder
Post a Comment