Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: specifying all values different condition
From
Viktor Emonds <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: specifying all values different condition
Date
Thu, 13 Feb 2014 11:12:50 +0000
Hello everyone,
I've been breaking my head over something that can probably be very easily done. I want to evaluate whether the value on any variables in a varlist matches with the value of any other variable in the last. If it were only three variables, this would amount to something like:
if var1!=var2 & var1!=var3 & var2!=var3
How could I do this in a more elegant way when the varlist becomes much longer and the number of these 1-on-1 dissimilarity conditions would exponentially increase? Thanks!
Best,
Viktor
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/