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
dtalink for probabilistic matchingHello: I tried to add this conversation in an old post, but haven't been able to see much regarding …
Geocoding adviceDear STATA Community, I need some advice on geocoding: My sample has more than a million observati…
Univariate ordinal regression when proportional odds assumption failsHello, there! I'm doing a regression on an ordinal variable, mmRS (3 months modified rankin scale, …
-aweight- if only dependent variable represents an average/medianHi everyone, my data contains information of approx. 500 firms over a 7-year-period (quarterly obse…
Conditional execution of a code line on if clauseHey there, Iam still newish to Stata and want to code it like other languages. So my todays project…
Subscribe to:
Post Comments (Atom)
0 Response to Identify a number which is not present in a numbers' list
Post a Comment