Announcement

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

  • Structural Equation Modelling (SEM)using STATA

    Hi,
    I want to analyse my data with SEM using STATA. But i still confuse because there is no unobserve variable in my model. This is what my model looks like:
    Click image for larger version

Name:	Screen Shot 2020-06-06 at 8.42.52 PM.png
Views:	2
Size:	20.1 KB
ID:	1557305

    Can i still using SEM?

  • #2
    In the Stata Manual) we read that structural equation models are ‘a way of thinking ‘. A frame of mind, so to speak. Therefore, path analysis, which matches with the diagram shown in #1, is part of other SEM resources, such as latent variables, growth models, MIMIC, etc.

    Structural equation modeling encompasses a broad array of models from linear regression to measurement models to simultaneous equations, including along the way confirmatory factor analysis (CFA), correlated uniqueness models, latent growth models, multiple indicators and multiple causes (MIMIC) models, and item-response theory (IRT) models.
    Structural equation modeling is not just an estimation method for a particular model in the way that Stata’s regress and probit commands are, or even in the way that stcox and mixed are. Structural equation modeling is a way of thinking, a way of writing, and a way of estimating
    Best regards,

    Marcos

    Comment


    • #3
      Originally posted by Ainun Nisa View Post
      . . .there is no unobserve variable in my model.

      Can i still using SEM?
      Yes.

      You don't need unobserved variables (latent factors) in your SEM model in order to use sem. As Marcos mentions, you have what is called a "path analysis" model, and these can be fitted using sem as well.

      When I re-create your path diagram using Stata's sembuilder thingy, I get the following.
      Click image for larger version

Name:	Path.png
Views:	1
Size:	16.2 KB
ID:	1557430
      Which, when I execute it against an artificial dataset, produces the following line of code.
      Code:
      sem (income -> health, ) (asset -> health, ) (distance -> income, ) (distance -> asset, ), nocapslatent
      This can be rendered equivalently—but a little more readable—manually, as in the output below. (Begin at the "Begin here" comment; the first part is just to create the phony data.)

      .ÿ
      .ÿversionÿ16.1

      .ÿ
      .ÿclearÿ*

      .ÿ
      .ÿsetÿseedÿ`=strreverse("1557304")'

      .ÿ
      .ÿtempnameÿCorr

      .ÿmatrixÿdefineÿ`Corr'ÿ=ÿJ(4,ÿ4,ÿ0.5)ÿ+ÿI(4)ÿ*ÿ0.5

      .ÿ
      .ÿquietlyÿdrawnormÿdistanceÿassetÿincomeÿhealth,ÿdoubleÿcorr(`Corr')ÿn(250)

      .ÿ
      .ÿ*
      .ÿ*ÿBeginÿhere
      .ÿ*
      .ÿsemÿ(healthÿ<-ÿincomeÿasset)ÿ(assetÿincomeÿ<-ÿdistance),ÿ///
      >ÿÿÿÿÿÿÿÿÿnocnsreportÿnodescribeÿnofootnoteÿnolog

      StructuralÿequationÿmodelÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ250
      Estimationÿmethodÿÿ=ÿml
      Logÿlikelihoodÿÿÿÿÿ=ÿ-1293.1549

      ------------------------------------------------------------------------------
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿOIM
      ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      -------------+----------------------------------------------------------------
      Structuralÿÿÿ|
      ÿÿhealthÿÿÿÿÿ|
      ÿÿÿÿÿÿincomeÿ|ÿÿÿ.2690603ÿÿÿ.0560947ÿÿÿÿÿ4.80ÿÿÿ0.000ÿÿÿÿÿ.1591167ÿÿÿÿ.3790039
      ÿÿÿÿÿÿÿassetÿ|ÿÿÿ.3759859ÿÿÿ.0554518ÿÿÿÿÿ6.78ÿÿÿ0.000ÿÿÿÿÿ.2673023ÿÿÿÿ.4846694
      ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.0382719ÿÿÿ.0497898ÿÿÿÿ-0.77ÿÿÿ0.442ÿÿÿÿ-.1358581ÿÿÿÿ.0593144
      ÿÿ-----------+----------------------------------------------------------------
      ÿÿincomeÿÿÿÿÿ|
      ÿÿÿÿdistanceÿ|ÿÿÿ.4885884ÿÿÿ.0575273ÿÿÿÿÿ8.49ÿÿÿ0.000ÿÿÿÿÿ.3758369ÿÿÿÿ.6013399
      ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.0079931ÿÿÿ.0553355ÿÿÿÿ-0.14ÿÿÿ0.885ÿÿÿÿ-.1164487ÿÿÿÿ.1004624
      ÿÿ-----------+----------------------------------------------------------------
      ÿÿassetÿÿÿÿÿÿ|
      ÿÿÿÿdistanceÿ|ÿÿÿ.4259697ÿÿÿ.0603151ÿÿÿÿÿ7.06ÿÿÿ0.000ÿÿÿÿÿ.3077542ÿÿÿÿ.5441851
      ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ.0438545ÿÿÿÿ.058017ÿÿÿÿÿ0.76ÿÿÿ0.450ÿÿÿÿ-.0698568ÿÿÿÿ.1575659
      -------------+----------------------------------------------------------------
      var(e.health)|ÿÿÿ.6180408ÿÿÿ.0552793ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.5186608ÿÿÿÿÿ.736463
      var(e.income)|ÿÿÿ.7635723ÿÿÿÿ.068296ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.640791ÿÿÿÿ.9098796
      ÿvar(e.asset)|ÿÿÿ.8393711ÿÿÿ.0750756ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.7044014ÿÿÿÿ1.000202
      ------------------------------------------------------------------------------

      .ÿ
      .ÿexit

      endÿofÿdo-file


      .


      In general, I recommend using lower case for names of observed variables, especially in the context of sem and gsem.

      Comment


      • #4
        Leaving your orignal question aside, your model claims that there is no direct effect from Distance to Health, all the association between these two variables is mediated by Income and Asset. I'm not sure that's reasonable. But you can test that assumption against a model with that path added. (Or, in this case, you can simply test the model you propose and have a look at model fit, that will be sufficient here). Even though path analysis is not SEM in a strict sense, you test path models with SEM software and if you leave out one or several paths (as you do), the model becomes falsifiable and you need to check model fit.

        Comment


        • #5
          If it helps any, you can think of the observed variables as being perfectly measured. You therefore don't need latent variables for them.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            Thank you all for all the answer. Its really helpful.
            But I have this question. If variable health is chategorical and its value is 1-4 (1 for very bad health condition and 4 for very good health condition). Can i still use sem? or should i use Gsem?

            Comment

            Working...
            X