Hi all,
I have two variables: shdist (numeric) and District (string), where District gives the district name and shdist gives district code. I want to create value label for shdist based on District. I used labmask which I downloaded by typing search labutil.
I got an error "District not constant within groups of shdist" which means for some value of shdist, there are different District names. This is possibly due to data entry error and I need to locate the observations for which this happens. Could anyone suggest how to go about this?
I'm attaching here a sample data but I'm not sure if the offending observations appear in these 100 observations.
Please let me know if you need some further clarification on the problem.
Thanks,
I have two variables: shdist (numeric) and District (string), where District gives the district name and shdist gives district code. I want to create value label for shdist based on District. I used labmask which I downloaded by typing search labutil.
I got an error "District not constant within groups of shdist" which means for some value of shdist, there are different District names. This is possibly due to data entry error and I need to locate the observations for which this happens. Could anyone suggest how to go about this?
I'm attaching here a sample data but I'm not sure if the offending observations appear in these 100 observations.
Please let me know if you need some further clarification on the problem.
Thanks,
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str12 hhid byte shdist str27 District " 2 1 1" 1 "SRIKAKULAM" " 2 1 9" 1 "SRIKAKULAM" " 2 1 17" 1 "SRIKAKULAM" " 2 1 33" 1 "SRIKAKULAM" " 2 1 41" 1 "SRIKAKULAM" " 2 1 49" 1 "SRIKAKULAM" " 2 1 57" 1 "SRIKAKULAM" " 2 1 65" 1 "SRIKAKULAM" " 2 1 73" 1 "SRIKAKULAM" " 2 1 89" 1 "SRIKAKULAM" " 2 1 105" 1 "SRIKAKULAM" " 2 1 113" 1 "SRIKAKULAM" " 2 1 121" 1 "SRIKAKULAM" " 2 1 129" 1 "SRIKAKULAM" " 2 1 137" 1 "SRIKAKULAM" " 2 1 145" 1 "SRIKAKULAM" " 2 1 153" 1 "SRIKAKULAM" " 2 1 161" 1 "SRIKAKULAM" " 2 1 169" 1 "SRIKAKULAM" " 2 1 177" 1 "SRIKAKULAM" " 2 1 185" 1 "SRIKAKULAM" " 2 1 193" 1 "SRIKAKULAM" " 2 1 201" 1 "SRIKAKULAM" " 2 1 209" 1 "SRIKAKULAM" " 2 1 217" 1 "SRIKAKULAM" " 2 1 225" 1 "SRIKAKULAM" " 2 1 233" 1 "SRIKAKULAM" " 2 1 241" 1 "SRIKAKULAM" " 2 1 249" 1 "SRIKAKULAM" " 2 1 257" 1 "SRIKAKULAM" " 2 1 265" 1 "SRIKAKULAM" " 2 1 273" 1 "SRIKAKULAM" " 2 1 281" 1 "SRIKAKULAM" " 2 1 289" 1 "SRIKAKULAM" " 2 1 297" 1 "SRIKAKULAM" " 2 2 9" 1 "SRIKAKULAM" " 2 2 24" 1 "SRIKAKULAM" " 2 2 54" 1 "SRIKAKULAM" " 2 2 69" 1 "SRIKAKULAM" " 2 2 84" 1 "SRIKAKULAM" " 2 2 99" 1 "SRIKAKULAM" " 2 2 114" 1 "SRIKAKULAM" " 2 2 129" 1 "SRIKAKULAM" " 2 2 159" 1 "SRIKAKULAM" " 2 2 174" 1 "SRIKAKULAM" " 2 2 189" 1 "SRIKAKULAM" " 2 2 219" 1 "SRIKAKULAM" " 2 2 234" 1 "SRIKAKULAM" " 2 2 249" 1 "SRIKAKULAM" " 2 2 264" 1 "SRIKAKULAM" " 2 2 279" 1 "SRIKAKULAM" " 2 2 294" 1 "SRIKAKULAM" " 2 2 309" 1 "SRIKAKULAM" " 2 2 324" 1 "SRIKAKULAM" " 2 2 339" 1 "SRIKAKULAM" " 2 2 354" 1 "SRIKAKULAM" " 2 2 369" 1 "SRIKAKULAM" " 2 2 384" 1 "SRIKAKULAM" " 2 2 399" 1 "SRIKAKULAM" " 2 2 414" 1 "SRIKAKULAM" " 2 2 429" 1 "SRIKAKULAM" " 2 2 444" 1 "SRIKAKULAM" " 2 2 459" 1 "SRIKAKULAM" " 2 2 474" 1 "SRIKAKULAM" " 2 3 1" 2 "VIZIANAGARAM" " 2 3 7" 2 "VIZIANAGARAM" " 2 3 19" 2 "VIZIANAGARAM" " 2 3 25" 2 "VIZIANAGARAM" " 2 3 31" 2 "VIZIANAGARAM" " 2 3 37" 2 "VIZIANAGARAM" " 2 3 43" 2 "VIZIANAGARAM" " 2 3 49" 2 "VIZIANAGARAM" " 2 3 55" 2 "VIZIANAGARAM" " 2 3 67" 2 "VIZIANAGARAM" " 2 3 73" 2 "VIZIANAGARAM" " 2 3 79" 2 "VIZIANAGARAM" " 2 3 85" 2 "VIZIANAGARAM" " 2 3 91" 2 "VIZIANAGARAM" " 2 3 97" 2 "VIZIANAGARAM" " 2 3 109" 2 "VIZIANAGARAM" " 2 3 115" 2 "VIZIANAGARAM" " 2 3 121" 2 "VIZIANAGARAM" " 2 3 127" 2 "VIZIANAGARAM" " 2 3 133" 2 "VIZIANAGARAM" " 2 3 139" 2 "VIZIANAGARAM" " 2 3 145" 2 "VIZIANAGARAM" " 2 3 151" 2 "VIZIANAGARAM" " 2 3 157" 2 "VIZIANAGARAM" " 2 3 163" 2 "VIZIANAGARAM" " 2 3 169" 2 "VIZIANAGARAM" " 2 3 175" 2 "VIZIANAGARAM" " 2 3 181" 2 "VIZIANAGARAM" " 2 3 187" 2 "VIZIANAGARAM" " 2 3 193" 2 "VIZIANAGARAM" " 2 3 199" 2 "VIZIANAGARAM" " 2 3 205" 2 "VIZIANAGARAM" " 2 3 211" 2 "VIZIANAGARAM" " 2 3 217" 2 "VIZIANAGARAM" " 2 3 223" 2 "VIZIANAGARAM" " 2 3 229" 2 "VIZIANAGARAM" end
Comment