Hello,
I have a database that has repeated observations on a single variable. The problem is that the variable is a string type. I would like to develop a program in which it takes for example the first obs of the variable, then compare it to all the others and in the case that it is repeated the program could erase all but one, so there is just one and not a lot of repeated variables
Something like this:
var x
1 SAN JAVIER
2 SAN JAVIER
3 MATEGUA
4 OROBAYAYA
5 SAN JAVIER
6 OROBAYAYA
7 SUCRE
Related Posts with How to keep only the observations that are not repeated on a single string variable?
Questions about teffects nnmatch & error use option osample()Dear Stata Community! I hope you can help me out with some of the questions I have regarding the ne…
Error naming output files from macroHello, looping over a series of input files, I want to create a series of output files and name the…
PSM (ATET and ATE)Hello all, I will please like an answer to this question. When calculating Average Treatment Effect…
SIR models in StataDear all, I have to estimate the equations of a SIR model to project the spread of an infectious di…
Sortring in descending order in scatterplotsHi all, I am trying to build a two-way scatterplot having on the y axis values of a variable called…
Subscribe to:
Post Comments (Atom)
0 Response to How to keep only the observations that are not repeated on a single string variable?
Post a Comment