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?
Replace missing values that are indicated with an asterisk (*)I have a problem regarding an Excel file that has missing values that are indicated with an asterisk…
Potential Serial-correlation in a FE Panel ModelHi Statalist! Any advice on the below, would be very much appreciated! We have a fixed effects mod…
Gradient colored scatterplotHello everyone, I am trying to make a scatter plot using the plottig scheme (or any scheme for that…
OECD data - variables of interest are all in one variableI doubt I am the first person to run into this issue, but when you pull time-series data from the OE…
Collapse produces different but optically similar resultsDear all, I am having a weird problem with the collapse command. I collapse my data to a sum and th…
Subscribe to:
Post Comments (Atom)
0 Response to How to drop the duplicates with the fewest missing values?
Post a Comment