Announcement

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

  • Variable creation

    Dear Experts,

    This question related to the one that I asked before. Please, help me to construct the following variable:

    Let's say we have the following sample:

    Date Id Z _n

    2000 35 0 20
    2001 35 0 20
    2002 35 1 20
    2003 35 1 20

    1999
    2000 20 0
    2002 20 0
    2003 20 0
    2004 20 0

    The variables are the following: Id - firm Id, Z - shock, _n = id of a matched firm. So, what I need is to basically to have the same shock "Z" - time "date" for a matched firm. Ideally, new sample should look like this:


    Date Id Z _n

    2000 35 0 20
    2001 35 0 20
    2002 35 1 20
    2003 35 1 20

    1999
    2000 20 0
    2002 20 1
    2003 20 1
    2004 20 0

    Please, help me with this issue.

    Best regards,
    Alberto

  • #2
    Please read and act on http://www.statalist.org/forums/help#stata to provide a data example that can actually be run.

    Comment


    • #3
      Also this appears to be at most a minor variation on the question posed at http://www.statalist.org/forums/foru...score-matching a mere 45 minutes ago, and which already has a response there.

      Comment

      Working...
      X