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
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
Comment