Status:Closed    Asked:Feb 20, 2017 - 08:42 AM

Creating unique identifier

I am trying to create a unique ID however I am getting duplicates. I am using the code,

egen uniqueid = group(pernum serial)

any reason why this is the case of a solution would help!

Do you have the same question? Follow this Question

Staff Answer


Jeff Bloem


This issue likely arrises when you are trying to create a unique identifier across CPS samples. Both SERIAL and PERNUM uniquely identify households and persons within those households within a given survey month and year - not across years.

CPSIDP is an IPUMS-CPS defined variable that uniquely identifies individuals across CPS samples. The first six digits of CPSIDP index the four-digit year and two-digit month that the household was first in the CPS. CPSIDP allows users to link a respondent appearing with a designated household roster line number (LINENO) across samples, based on the 4-8-4 rotation pattern, by assigning a unique CPSIDP value to this line number. More information about linking households and individuals across CPS samples is available in this working paper.

I hope this is helpful.


Feb 20, 2017 - 09:17 AM

Report it


unique person id variable?
Creating unique IDs for PUMAs
Unique identifier for secondary families?
Why is the concatenation of YEAR, SERIAL, and PERNUM not unique?
Login   |   Register

Recently Active Members

View More »

Share |