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
Group and label variables (perhaps using -rangejoin-)Hello, my following problem seems to me as being pretty complicated. However, I will try to explain…
Problem with opening the datasetHi Stata community. I am trying to open a .dta dataset, which I have been working on for the last fo…
Problem with specifying a range of year or listing yearsHello, I am quite new to Stata and am trying to analyse some time series data but am having some is…
Sorted bar graphs by year for multiple variables Code: * Example generated by -dataex-. To install: ssc install dataex clear input str32 country in…
Appropriateness of Fixed Effects when using a dummy that is only time variant for some panel units.I am looking to estimate the impact of the presence of a fiscal council on a country's real growth f…
Subscribe to:
Post Comments (Atom)
0 Response to Dataset merging to maximize number of observations
Post a Comment