Hello,
I am using a panel data that survey every month for individual. And one of the varialbe or information I would like to find out is the number of unemployment for each individual. And the code I am using is following:
But I don't know whether the code is correct to get what I want.
I also use following to see whether there is a difference
But will get error message
I am using a panel data that survey every month for individual. And one of the varialbe or information I would like to find out is the number of unemployment for each individual. And the code I am using is following:
Code:
bysort prim_key: gen n_ump = sum(unemploy)
I also use following to see whether there is a difference
Code:
bysort prim_key: egen n_ump = count(unemploy)
Code:
variable _000000 already defined variable _000002 aldready defined r(110)
Comment