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
Undesired behavior (or bug): confirm new variableConsider the following examples: Code: clear confirm new variable byte confirm new variable byte i…
how to calculate the loop for variables?I need to calculate the second row variable minus the first row variable, the fourth row variable mi…
Missing Values for Age Variable in Panel DataHi All, I am using a panel data consisting of 5 waves. The corresponding year and waves are as follo…
Is DiD possible for examining effect of a continuous treatment on a continuous outcome among single group dependent sample?Hi Statalist, I'm new to the forum and a novice Stata user. I'm studying the effect of a continuou…
Panel: setting one year as the reference year.Dear statalist community, I am conducting an analysis on green tariffs and renewable rebounds. Preci…
Subscribe to:
Post Comments (Atom)
0 Response to Identify a number which is not present in a numbers' list
Post a Comment