Hello.
I have a file with about 30 columns of integers. I need to create a dummy variable that indicates if at least 2 values per row of any columns have identical values between them.
For example
12 13 12 14: dummy = 1
12 13 14 12: dummy = 1
12 13 14 15: dummy = 0
How can I do it? Thank you
Related Posts with 2 identical values between any two columns
Using SEM for estimation of a RI-CLPMI am trying to estimate a random intercept cross lagged panel model (RI-CLPM), as recommended by Ham…
Move selected observations one variable/column to the rightHello. Please consider my data: Code: * Example generated by -dataex-. To install: ssc install dat…
Creating new variable from other variablesHello; I am trying to merge some variables to create a new variable. To expand, I am trying to cre…
Collapse command, OLS regression, and weighing per groupHello everyone, I am analyzing a large dataset with STATA, and am utilizing OLS regression to try t…
switch_probitHello Statalist, I am trying to use switch_probit for an endogenous switching model. I once used it…
Subscribe to:
Post Comments (Atom)
0 Response to 2 identical values between any two columns
Post a Comment