Announcement

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

  • Dummy Variable matching companies in different groups over time

    Dear Statalist members,

    I want to create a dummy variable for examining a subset of my sample.
    My sample consists of three groups. There are companies being exposed to an intermediate level of regulation from 2013 to 2016 (segment 1) in a pre period. Then a regulatory change took place. So now there are companies that are exposed to high (segment 2) and low regulation (segment 3) in the 2017 and 2018 post period.

    I now want to create the dummy variables pre_high and pre_low. So I want to create a dummy that equals 1 if a company of segment 1 within the pre period has chosen segment 2 in the post period.

    I'm kinda stuck right now and not sure how to create such a dummy variable.

    Thanks a lot for any suggestions.
    Martin





  • #2
    Martin:
    see -help recode-.
    Paraphrasing Clyde Schechter 's wise remind that creeps up oftentimes on this forum, whenever you ask for help/advice/code, give an example/excerpt of your data via -dataex-. Thanks.
    Kind regards,
    Carlo
    (Stata 16.0 SE)

    Comment

    Working...
    X