Hello everyone,
I have a variable called stratum which is supposed to carry numbers from 1 to 10. Sometimes a few numbers (e.g. 3 and 7) are missing when I tabulate the stratum variables. I want to know (without tabulating stratum) which numbers are missing from the list and store the missing values in new variables.
i.e.:
If startum variable contains only 1,2,4,5,6,8,9 and 10, then I want to generate two new variables var1 & var2 where var1 has value 3 and var2 has value 7 (or temporarily store values 3 and 7 in some temporary variables).
I don't know how to do that and I need your help in doing so.
Thanks in advance.
Amit
Related Posts with Identify a number which is not present in a numbers' list
Invalid syntax error when combining foreach and logout ttable2Hi, I am trying to output the ttable2 results of different groups. The code I am writing is as foll…
Time Fixed Effects EsttabDear all, I would like to add a line with the word "Yes" if time fixed effect is used. Unfortunatel…
Check if two exposure varibales are independent of each otherHi, Apologies if this is very obvious, I've managed to get confused about it. If i want to check if…
Difference-in-difference with interactionsHi, I'm trying to estimate a straight forward Difference-in-Difference model to find the impact of …
Count distinct digits of observationsDear statalists, I would like to count the number of digits an observation has as follows: Numbe…
Subscribe to:
Post Comments (Atom)
0 Response to Identify a number which is not present in a numbers' list
Post a Comment