I have a huge industrial survey which is a panel dataset. I have the id of
the each firm and the region in which this firm is based. I'd like to
check how many of the firms in this dataset have errors in the sense
that the same id would be associated with a different region and/or that
a given firm would have different year of foundation. (to have an idea of
the % of errors in the database);
I also want to know which ones are the "problematic" firms.
You haven't how the year of foundation plays into this; let's assume
(probably incorrectly) that your first year of data for each firm defines
that object. Then