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
IV weakness testHello I just made a 2SLS estimate with an IV. I would like to test if my instrument is weak or stro…
Looping with conditionI am using Stata 15 for generating my data. I would like to generate my Outcome y (as continuous var…
List unique values by groupHellow there, Can you help me how I can list only unique values by group? Example I have 100 observ…
Saving files -- other than current directorySuppose current working directory is Code: cd "G:\Data\Raw_Data" How do I save a file in the Dat…
About period setting in DID model according to exogenous shock date.Hello, Although I searched into the forum could not find a proper answer about setting a research p…
Subscribe to:
Post Comments (Atom)
0 Response to Flag repetitions
Post a Comment