Announcement

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

  • Mediation Analysis Error

    Hi I am trying to do mediation analysis for student test scores in order to predict 4th grade scores (DV) from Kindergarten scores (IV) through 1st grade scores (MV). I am using the command
    "sem (FourthReading <- FirstDIBELS KDIBELS) (FirstDIBELS <- KDIBELS)"
    but am getting error r(503) saying model not identified and no paths from latent variable FourthReading to observed variables. I tried to problem solve and believe that this might be because some of the students do not have a recorded first grade score so it is marked as a "." in their first grade test cell. I attempted to use an if statement to not include those students but received the same error message. Any help/advice would be greatly appreciated since I need to figure this out in the next week or so for my research fellowship.

  • #2
    Welcome to Statalist.

    Are you aware that to sem variable names that begin with a capital letter are considered latent (unobserved) variables? (In the output of help sem click on sem and gsem path notation.)

    I think perhaps not, because all three of your variable names begin with a capital letter, which would mean that you have no observed variables. You may need to rename your variables to start with a lower-case letter.

    With regard to students who have a missing value for any of the observed (non-latent) variables, Stata will automatically exclude those observations from the analysis.

    Comment


    • #3
      you do not necessarily have to rename your variables; if all variables are observed you can use the "nocapslatent" option; if some are observed and some are latent, you can use the "latent(names)" option; see
      Code:
      help sem_and_gsem_syntax_options
      you do not really provide sufficient information for giving advice about the missing data issue; however, one option to consider is "method(mlmv)" option; see
      Code:
      help sem_estimation_options

      Comment


      • #4
        Originally posted by William Lisowski View Post
        Welcome to Statalist.

        Are you aware that to sem variable names that begin with a capital letter are considered latent (unobserved) variables? (In the output of help sem click on sem and gsem path notation.)

        I think perhaps not, because all three of your variable names begin with a capital letter, which would mean that you have no observed variables. You may need to rename your variables to start with a lower-case letter.

        With regard to students who have a missing value for any of the observed (non-latent) variables, Stata will automatically exclude those observations from the analysis.
        you are right. Your answers help me to solve the problems in my datasets. Thank you so much

        Comment

        Working...
        X