I have a dataset that has data that is pooled across different years.
At the moment, I would to like be able to identify the occupational codes which are common across two years (e.g. 2004 and 2005).
So for example, say in the year 2004 the following occupational codes are present:
0101
0102
0103
0104
0105
And in the year 2005, the following occupational codes are present:
0101
0102
1111
1112
1113
Is there a command/function in Stata which can tell me that only occupational codes "0101" and "0102" are present in both? Note that I can't use merge as I'm not using two different .DTA files - it's within the dataset.
Thanks
Related Posts with Identifying differences in a variable within a dataset
Trouble merging multiple files with a loopHi, I have 62 files that are numbered in sequential order (1,2,3...) that I want to merge into and …
Link suppliers-customer's transaction records by yearsHi Stata Users, I am using Stata for my project that links supplier-customer transaction records. …
Population size (with sampling weights) != actual population sizeI'm performing some analyses were I need to draw a stratified two-stage sample from some population …
Observations used in the estimation of a particular coefficientDear Statalist users, I am looking for a way to find the number of observations used to estimate a …
Analysis of panel data with different time spansHello I am preparing my thesis but I can not process further due to the problem of merging data. I h…
Subscribe to:
Post Comments (Atom)
0 Response to Identifying differences in a variable within a dataset
Post a Comment