Announcement

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

  • Problems with margins post GSEM (STATA 17.0)

    Hi,

    I am currently running a GSEM model using the following syntax:

    gsem( ///
    (b6.means_of_travel <- sex i.seg i.household_composition ///
    journey_minutes sameresschoolED sameresschool SA ///
    corine entropy ///
    roads active bus rail house ///
    deprivation ///
    M1[powscSA], family(multinomial) link(logit)) ///
    (journey_minutes sameresschoolED sameresschool SA <- corine entropy ///
    roads active bus rail house ///
    deprivation) ///
    , nocapslatent latent(M1) startvalues(fixedonly))

    This GSEM specification works fine. But typically after such models, I run the following postestimation:

    margins, dydx(*) atmeans

    However, this margins syntax, and most of the other variations [i.e., margins, dydx(*) predict(outcome(*) fixed)] are not working. Specifically, the following error emerges:

    r(498): prediction is a function of possibly stochastic quantities other than e(b).

    Any indication on where I am going wrong, and advice on how to correctly run my margins syntax, would be greatly appreciated. Thanks in advance.
    Conor
Working...
X