Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overall/total, direct and indirect effects in GSEM - possible/not possible?

    Dear Statalist,

    In Stata 14/15 in a GSEM model is it possible to obtain an estimate of the overall effect of an exogenous/independent variable on an "ultimate" endogenous/dependent variable when the path linking the exogenous variable and the ultimate endogenous variable goes via two separately linked endogenous variables, where the error/links of the endogenous variables may differ? I assume this is conceptually the same as the "total effect" in a standard mediation model? I know you can obtain total/direct/indirect effects in a GSEM model in Mplus, but it appears not in Stata's GSEM?

    Here is a reproducible example of the form of model I am interested in, where the overall effect I am interested in is of "smoke" on "bwt_ord". Note the differing errors/links of the endogenous variables. My ultimate endogenous variable is ordinal, hence the (probably unnecessary) creation of an ordinal variable.

    * Load data
    webuse lbw, clear

    * Create ordinal variable
    gen bwt_ord = .
    replace bwt_ord = 0 if (bwt <= 2500)
    replace bwt_ord = 1 if (bwt > 2500 & bwt < 3500)
    replace bwt_ord = 2 if (bwt > 3500)

    * GSEM model
    gsem (smoke -> ftv, family(poisson) link(log)) ///
    (smoke -> age, family(gaussian) link(identity)) ///
    (ftv -> bwt_ord, family(ordinal) link(logit)) ///
    (age -> bwt_ord, family(ordinal) link(logit))

    If there is no way to obtain estimates of "overall effect" parameters for the exogenous variable, are there any alternatives, e.g. in the model above predicting values of bwt_ord as values of smoke differ (with identical changes in all paths for smoke)?

    Thank you

  • #2
    Assuming "overall effect" is the "Total effect" you are after. The total effect is calculated as "The direct effects + The indirect effects", where the indirect effects are the product of two paths (a*b). In your case 'smoke' has two direct effects i)smoke-> ftv and ii)smoke -> age) and two indirect effects i) smoke->ftv*ftv->bwt_order and ii) smoke->age*age->bwt_order.

    The total effect will be to summing up all the direct and indirect effects. you can estimate the indirect effect by using 'nlcom' command after running the gsem model. Help file for sem/gsem should help you in this, type: help gsem. However, you have concerns to deal with:

    Your endogenous outcome distributions are different. I am not sure how that will work out when calculating the indirect effect. For example age has a identity link but bwt_order has a logit link. Though logit link underlying is a continuum, yet two are in different scales and how would you interpret their product term (a*b)/indirect effect?

    Muthen (2011) discussed about a scaling factor under such circumstances which might be useful in this regard:
    Applications of Causally Defined Direct and Indirect Effects in Mediation Analysis using SEM in Mplus Bengt Muth ́en, October 28, 2011




    Please use code delimiters for providing Stata codes and use -dataex- for providing data examples. Read the FAQ section on how to make meaningful posts.
    Last edited by Roman Mostazir; 02 May 2018, 06:39. Reason: Just realized the provided example is for demo only. deleted the model path based concerns.
    Roman

    Comment

    Working...
    X