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
Create a variable with an increasing value for different groupsDear all, I am using Stata version 14.2. I have a data set with groups of products and dates of we…
Offset() option in Poisson/negative binomial regressionHello everyone, I am working on count data and have the follow-up time in days. Do I need to log-tr…
ItsaDear I am new using time series analises in stata, so need some help. I am try to use the ITSA comma…
Use Stata program with same name in different directoriesHi, I have a user-written program saved twice in my computer: once inside my system directory's usua…
Merge (m:1) and data orderingHi all, please consider the following data example: Code: /*clear . input str6 id byte str4 loc …
Subscribe to:
Post Comments (Atom)
0 Response to Dataset merging to maximize number of observations
Post a Comment