Suppose I have a dataset containing two variables X and Y. Without resorting the data, I would like to add 2 flag variables, one indicating whether the value of X has occurred earlier in the dataset and one indicating whether the value of Y has occurred earlier.
What's the best way to do that in Stata?
Related Posts with Flag repetitions
XTSCC for Random EffectCan I use xtscc command to treat hetero and autocorrelation in RE model? and what command can I use …
Replace value while keeping original labelHi everyone, I would like to replace the value of X1 (SN1) by X2 (SN2) while keeping the original v…
How to count "at least one"Hello, I apologise for what I'm sure is a trivial question but I've been searching through the foru…
local with semi-colon using #delimitHello, I am cleaning a large dataset & now need to make some manual changes to a string variabl…
Convert data from wide to longHi, My original data is as follows. The first 2 letters in each columns are variable name and year …
Subscribe to:
Post Comments (Atom)
0 Response to Flag repetitions
Post a Comment