As the title suggests, I am trying to remove duplicate values across several variables (c30) in a panel data set (sorted by firm id and year), so for example for Firm 3 there are two 2012 rows and one has observations for the variables and one has missing values.
I have looked in a couple of other similar posts and in Nick Cox's notes on the topic in general but I have been unable to come up with a solution.
The code I have tried is:
Code:
collapse (firstnm) `vbles', by(BvDIDnumber Year)
This gave me an error message saying 'varlist required'.
If I enter the names of all variables instead of 'vbles' the error persists.
Apologies if I have missed something in the notes I mentioned, which are always extremely useful for various things I've done I'd liek to add.
Thanks in advance,
Paul
0 Response to Removing duplicates across several variables in panel data and keep the dup with non-missing values
Post a Comment