Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: duplicate values of variables


From   "Carter Rees" <[email protected]>
To   <[email protected]>
Subject   st: duplicate values of variables
Date   Tue, 24 Oct 2006 15:46:56 -0400

Statalist,

I have a data set in which the unit of analysis is the survey respondent.
Each respondent was asked to nominate up to ten friends and enter a unique
id for those friends in the variables friend1-friend10.  What I would like
to do is run a search through friend1-10 for each respondent to identify if
the respondent nominated any of the friends more than once by mistake.  If
they did I would like to be able to create a variable(s) which let me know
the id of the duplicated friend.  

Aid   f1    f2    f3    f4    f5    f6    f7    f8   f9    f10
22	12	23	23	44	.	.	.	.	.
.	
33	33	67	90	.	78	99	.	.	.
.
44	56	89	90	88	.	.	.	.	.
.	
55	34	35	35	.	34	67	89	90	77
66

Cheers,


Carter


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index