Announcement

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

  • Match observations in the concurrent year with observations in the previous year

    Dear all,

    I have encountered a problem when using propensity score matching to match observations in the concurrent year with observations in the previous year.

    I have tried the following code:

    psmatch2 X_main control_1 control_2 if year==1981, out(Y) common

    (X_main is the key explanatory variables, Y is the outcome variable, the rest are control variables)

    I thought the year specification would match all observations in the data-set with observations in the year 1981, but it turns out that observations in other years are also included in the _id column.

    I have also tried this code:

    psmatch2 X_main control_1 control_2 in 1/500, out(Y) common

    I thought the in 1/500 would match all observations with the 1st to 500th observations in the data-set, but it turns out that only the first 500 observations are matched with each other.

    Could anyone kindly teach me how to match all observations in the data-set (whole sample) with observations in a given year (or a given range)/ subsample?

    Thank you so much!

  • #2
    psmatch2's syntax is,
    Code:
    psmatch2 depvar [indepvars] [, options]
    where observations with depvar==1 are matched to observations with depvar==0.
    To match other years to 1981,
    Code:
    gen d = year == 1981
    psmatch2 d control_1 control_2, out(Y) common

    Comment


    • #3
      Thank you, Øyvind.

      If I use "gen d = year == 1981" to restrict observations to year 1981, then in the second line of code, why do I use "d" as dependent variable? Should I use the "depvar" instead?

      I might be wrong, but the following code seems to use a year dummy variable as the dependent variable.

      gen d = year == 1981
      psmatch2 d control_1 control_2, out(Y) common

      My intention is to conduct a two-stage-least-square regression to examine the impact of style drift on an outcome variable (firm revenue, or earnings per share). I want to match observations in the concurrent year with observations in the previous year based on a list of control variables, then record the matched observation in the previous year, and use the style drift indicator in the matched observation as the predicted value of style drift in the concurrent observation. Finally, use the predicted style drift indicator to explain the outcome variable.

      Could you kindly offer me some additional suggestions? Thank you very much.

      Thanks again.

      Comment


      • #4
        depvar here refers to a treatment group identifier so if you want to match 1981-observations with other years (based on control_1 and control_2), my suggestion in #2 is the way to go.

        Comment

        Working...
        X