Hi,
I would like to merge two datasets. Both datasets have the following columns: Year Gvkey Cusip CompanyName. These variables all have some missing values.
However, to maximize the number of observations after merging two datasets, I would like to use the following methods:
1. merge using year gvkey first, but if missing gvkey, then merge using year cusip.
2. merge using year gvkey first, but if missing gvkey, then merge using year company name (fuzzy match).
Could anyone share some thoughts on how to achieve these? Thanks!!
Related Posts with Dataset merging to maximize number of observations
Interactions in instrumental variable regressionHi statalist, I am using ivreg2 to carry out my instrumental variable analysis. This is my model wi…
Esttab rounding optionI am outputting regression results using esttab and am using the options b(a2) and se(a3) to round t…
putpdf after estoutDear Statalists, Is there any way to put a table modified by estout, using putpdf? for example, C…
How to keep a variable with 3 consecutive yearshi everyone, i have this database Code: nationalidnumber city naceprimary nacesecon…
Log transformed dependent variable in DDDear all, I am having some trouble in estimating a difference-in-differences model. In particular…
Subscribe to:
Post Comments (Atom)
0 Response to Dataset merging to maximize number of observations
Post a Comment