Announcement

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

  • Linear Regression for pre-post test

    Hi everyone,

    I would like some help for a linear regression model. I'm trying to compare the outcome (scores) between 2 academic years based on participation in a program.

    Would the command be: by 'program', sort : regress 'post-score var' 'pre-score var' ? Or is it: regress 'post-score var' 'program' 'pre-score var' ?

    I would really appreciate any help!

    Thank you
    Last edited by Polina Qwerty; 27 Oct 2021, 19:32.

  • #2
    Polina, more details about your data structure would help. I guess you have a student-level data with three variables: pre-score, post-score, and an indicator of program participation (1 = participants, 0 = non-participants). You may run the following codes.

    Code:
    gen dscore = postscore - prescore
    reg dscore program
    The codes above are essentially a DiD: The effect of program participation on score = score change for participants - score change for non-participants. In other words, non-participants are treated as a reference group for participants. But if you'd like to simply compare scores between two years only for participants, just run "reg dscore if program == 1", and the constant term would be the answer -- but it may not be interpreted as the effect of program on scores as something beyond the program may affect scores at the same time, and that's why non-participants are necessary to be the reference group.

    Comment


    • #3
      Thanks so much Fei! This was really helpful.

      Comment

      Working...
      X