Hello world,

Hope, you are doing well!

I am working on Annual Survey of Industries (ASI) microdata and using STATA for analysis.

(1) In some datasets, I found that values of variable H_Itm1 not unique within a1. Here, H_Itm1 is serial no and a1 is uniqueID.

(2) In some datasets, I found that variable Year not constant within a1. Here, a1 is uniqueID.

How can I solve it?

I tried to use these commands

duplicates report

duplicates list (var.) sepby(a1)

duplicates tag, gen(dup)

duplicates drop a1 J_Itm1, force

xtset a1 year

but nearly 84k observations were removed out of 128k observations.

Please give your opinion or suggestions on it.

More Raghavendra Yadav's questions See All
Similar questions and discussions