thank Clyde and Robert for your answers!
Clyde Schechter : There is no match because I just post only 30 first rows. I think if I use longer string, it could have matched.
Robert Picard : Very impressive your code as well as your rangestat program. As you said, it is complicated rangestat.
I still have some more problems:
1. Just alternative code to see whether I understand "rangestat".
2. If I understand, the code you provide allow me to match the first quarter by each id ("rssd9001") because I saw that the quarter ("yq") is always 1990q1.
So with this code, we can identify the private firm that have the closest size ("gta_w") with public firm at this first quarter.
So how I can index that this private firm is matched? For example, in the "combo.dta", the private bank with rssd9001==699751 is matched with public bank with rssd9001==46 (row2), how I can create dummy or index in row 5886 that could me that rssd9001==699751 is matched?
3. In the paper I send, authors say that:
So what I understand is once I identified the matched private firm, we use the matched private firm for the subsequent quarters. So there are 2 possibilities: (let's take the same example above):
- One is when the numbers of quarters of public firm are smaller than those of matched private firms? For example: public firm (rssd9001==46) have 3 more quarters (1990q2,1990q3,1990q4), whereas matched private firm (rssd9001==699751) have 5 more quarters. How I can tell Stata that I just use 3 more quarters of matched private firm?
- Second is (I think more complicated) when the numbers of quarters of public firm are larger than those of matched private firm? For example: public firm (rssd9001==46) have 3 more quarters (1990q2,1990q3,1990q4), whereas matched private firm (rssd9001==699751) have 2 more quarters. So I have to re-match the third quarter of public firm. How can I do that?
Thanks for your help!
Clyde Schechter : There is no match because I just post only 30 first rows. I think if I use longer string, it could have matched.
Robert Picard : Very impressive your code as well as your rangestat program. As you said, it is complicated rangestat.
I still have some more problems:
1. Just alternative code to see whether I understand "rangestat".
Code:
* find the index of the matching private firm replace gta_low = 0 if mi(gta_low) rangestat (max) id_low = id2use, interval(gta2use gta_low gta_low) by(yq) ***** *--> I think we can do this code directly rangestat (max) id_low2 = index, interval(gta2use gta_low gta_low) by(yq) assert id_low==id_low2 ***** * the matching private firm for that quarter with the nearest higher gta_w value gen double rssd_low = rssd9001[id_low] ***** *--> Or alternatively, rangestat (max) rssd_low2=rssd9001,interval(gta2use gta_low gta_low) by(yq) assert rssd_low==rssd_low2 *****
So with this code, we can identify the private firm that have the closest size ("gta_w") with public firm at this first quarter.
So how I can index that this private firm is matched? For example, in the "combo.dta", the private bank with rssd9001==699751 is matched with public bank with rssd9001==46 (row2), how I can create dummy or index in row 5886 that could me that rssd9001==699751 is matched?
3. In the paper I send, authors say that:
In "Corporate Investment and Stock Market Listing: A Puzzle?" (p.350)
Once a match is formed, it is kept in subsequent years to ensure the panel structure remains intact.
This allows us to estimate within-firm investment regressions.
Once a match is formed, it is kept in subsequent years to ensure the panel structure remains intact.
This allows us to estimate within-firm investment regressions.
- One is when the numbers of quarters of public firm are smaller than those of matched private firms? For example: public firm (rssd9001==46) have 3 more quarters (1990q2,1990q3,1990q4), whereas matched private firm (rssd9001==699751) have 5 more quarters. How I can tell Stata that I just use 3 more quarters of matched private firm?
- Second is (I think more complicated) when the numbers of quarters of public firm are larger than those of matched private firm? For example: public firm (rssd9001==46) have 3 more quarters (1990q2,1990q3,1990q4), whereas matched private firm (rssd9001==699751) have 2 more quarters. So I have to re-match the third quarter of public firm. How can I do that?
Thanks for your help!
Comment