I have duplicates that share values, but some are missing. I would like to keep the observation of each duplicate pair that has the least missing values.
I've used egen notmissing = rownonmiss(varlist) to count the number of non-missing variables per observation.
What command can I use to then remove duplicates based on which has the lowest notmissing-count?
Related Posts with How to drop the duplicates with the fewest missing values?
Impact of policyHello, I am new to Stata and I want to determine the impact of a policy on 8 countries using a 9 yea…
Generating Descriptive GraphHi all, I have individual-year data where my variable of interest is a transition into employment (…
Force Stata to not omit a variable and make consistent with an output in RI am using Stata 15. I have a situation where one of the independent dummy variables (election) is …
Oaxaca analysisHi, I am trying to use oaxaca command to run a nonlinar decomposition analysis I am using this code:…
How to modify value labels based on certain words already present in value labelsHello everyone, I have a set of categorical variables which have certain value labels attached to th…
Subscribe to:
Post Comments (Atom)
0 Response to How to drop the duplicates with the fewest missing values?
Post a Comment