Hi!
I have the following dataset:
Dummy = public /private
We need a code that can copy the SizeRatio from the public firm to the matched private firm.
The weight tells us how many times the observation has been matched.
The result should look like this:
Since we have a weight equal to 2, we need to duplicate that observation (Because wee ned to run a regression later..).
Can someone please help me with the code?
Thanks
1
I have the following dataset:
ID | Dummy | _weight | MatchID | SizeRatio |
1 | 1 | 0 | 4 | 5 |
2 | 1 | 0 | 6 | 4 |
3 | 1 | 0 | 6 | 2 |
4 | 0 | 1 | ||
5 | 0 | 0 | ||
6 | 0 | 2 | ||
7 | 0 | 0 |
We need a code that can copy the SizeRatio from the public firm to the matched private firm.
The weight tells us how many times the observation has been matched.
The result should look like this:
ID | Dummy | _weight | MatchID | SizeRatio |
1 | 1 | 0 | 4 | 5 |
2 | 1 | 0 | 6 | 4 |
3 | 1 | 0 | 6 | 2 |
4 | 0 | 1 | 5 | |
5 | 0 | 0 | 0 | |
6 | 0 | 2 | 4 | |
6 | 0 | 0 | 4 | |
7 | 0 | 0 | 0 | 0 |
Since we have a weight equal to 2, we need to duplicate that observation (Because wee ned to run a regression later..).
Can someone please help me with the code?
Thanks
1