Hi, below is a random data from my study. I want to create a variable that should contain min and max values of minwage_3 corresponding to SchOfemployment by regions (new_state). In other words, I want to create a table where min and max values of minwage_3 are shown, and also the corresponding SchOfemployment name is given, for each different region (new_state). Kindly help.
* Example generated by -dataex-. To install: ssc install dataex
clear
input str158 SchOfemployment double minwage_3 byte new_state
"Agriculture" 205 31
"Construction & maintenance of roads and buildings" 205 31
"Employment in private coaching classes/school/technical institutions" 236.54 31
"Loading and Unloading" 205 31
"Shops & commercial establishments " 256.15 31
"Stone breaking & stone crushing " 205 31
"Wood working establishments" 205 31
"Agriculture" 80 2
"Asbestos, cement and cocrete factories " 80 2
"Banks" 80 2
"Book selling and binding" 80 2
"Breweries and distilleries" 80 2
"Carpet/Shawl weaving industry" 80 2
"Casual employees/government offices contigency and works" 80 2
"Cinema/Film/Theatre industry" 80 2
"Construction & maintenance of roads and buildings" 80 2
"Cooperative credit socieities/marketing societies" 80 2
"Dal/Flour/Rice mills" 80 2
"Dispensaries" 80 2
"Employment of non-teaching staff in non-grant aided educational institutions" 80 2
"Forestry/social forestry, timbering operations " 80 2
"Hospitals, nursing homes and private clinics" 80 2
"Loading and Unloading" 80 2
"Local Authority/Municipality/Municipal Corporation/Gram Panchayat" 80 2
"Manufacturing of tobacco/cigar/beedi" 80 2
"Motor body builders/Mechanical/local transport workshops" 80 2
"Oil mills" 80 2
"Petrol & diesel oil pumps industry " 80 2
"Plantation (cincona, rubber tea & coffee etc. )" 80 2
"Plywood industry " 80 2
"Potteries industry" 80 2
"Printing presss (lithiography, photography & similar other works)" 80 2
"Private security agency " 80 2
"Public motor transport" 80 2
"Saw mills" 80 2
"Shops & commercial establishments " 80 2
"Stone breaking & stone crushing " 80 2
"Sweeper & sanitation workers" 80 2
"Agarbatti Manufacturing" 115.6 3
"Agarwood industry" 115.6 3
"Agriculture" 115.6 3
"Aluminium Industry" 115.6 3
"Asbestos, cement and cocrete factories " 115.6 3
"Bakeries and confectionaries (including biscuits) manufactory " 115.6 3
"Blacksmith" 115.6 3
"Bought leaf factory" 115.6 3
"Breweries and distilleries" 115.6 3
"Brick/ Charcoal kiln industry" 115.6 3
"Buffalo and cow milk premises" 115.6 3
"Candle and wax industry" 115.6 3
"Canteen and clubs" 115.6 3
"Cement & cement products industry" 115.6 3
"Cement and Hume pipe/cement prestressed/cement products industry" 115.6 3
"Chakki mills" 115.6 3
"Chemical/pharmaceutical industry" 115.6 3
"Cinema/Film/Theatre industry" 115.6 3
"Cleaner" 115.6 3
"Construction & maintenance of roads and buildings" 115.6 3
"Contractor's establishments of forest department" 115.6 3
"Cooperative credit socieities/marketing societies" 115.6 3
"Cotton Textile, Cotton Ginning and Pressing, Spinning, Weaving including Handloom Weaving" 115.6 3
"Dairy & dairy products/Procurement, processing, & distribution of milk" 115.6 3
"Dal/Flour/Rice mills" 115.6 3
"Dispensaries" 115.6 3
"Earth cutting/removing/filling/lebelling etc." 115.6 3
"Electricity (production & distribution)" 115.6 3
"Employment in private coaching classes/school/technical institutions" 115.6 3
"Film production/motion picture/studios (production, distribution & publicity)" 115.6 3
"Fisheries and sea food industry" 115.6 3
"Flood control " 115.6 3
"Food processing/food preservation/food products " 115.6 3
"Forestry/social forestry, timbering operations " 115.6 3
"General engineering " 115.6 3
"Gold/silver covering, gold casting & ornaments" 115.6 3
"Goldsmith" 115.6 3
"Grass cutting/wood cutting" 115.6 3
"Gutkha and pan masala " 115.6 3
"Handicraft " 115.6 3
"Handloom and weaving industry" 115.6 3
"Horticulture" 115.6 3
"Hospitals, nursing homes and private clinics" 115.6 3
"Hotels and restaurants" 115.6 3
"Hotels, restaurants & eating houses" 115.6 3
"Hydro electric projects" 115.6 3
"Ice cream, ice candy manufactory" 115.6 3
"Ice factories and cold storage " 115.6 3
"Irrigation department" 115.6 3
"Jute & coir industry" 115.6 3
"Jute bailing industry" 115.6 3
"Khadi & Village industry" 115.6 3
"Khandsari/sugar factory " 115.6 3
"L.P.G distribution" 115.6 3
"Local Authority/Municipality/Municipal Corporation/Gram Panchayat" 115.6 3
"Manufacturing of fire works/explosives " 115.6 3
"Manufacturing of papers, and paper boards, cardboards" 115.6 3
"Manufacturing of photo & picture frames " 115.6 3
"Manufacturing of soaps & detergents" 115.6 3
"Manufacturing of tobacco/cigar/beedi" 115.6 3
"Manufacturing of trunks/buckets/tin plates, and shaping & printing " 115.6 3
"Metal rolling/re-rolling (non ferrous)" 115.6 3
end
label values new_state new_sta
label def new_sta 2 "Arunachal Pradesh", modify
label def new_sta 3 "Assam", modify
label def new_sta 31 "Andaman&Nicobar", modify
[/CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input str158 SchOfemployment double minwage_3 byte new_state
"Agriculture" 205 31
"Construction & maintenance of roads and buildings" 205 31
"Employment in private coaching classes/school/technical institutions" 236.54 31
"Loading and Unloading" 205 31
"Shops & commercial establishments " 256.15 31
"Stone breaking & stone crushing " 205 31
"Wood working establishments" 205 31
"Agriculture" 80 2
"Asbestos, cement and cocrete factories " 80 2
"Banks" 80 2
"Book selling and binding" 80 2
"Breweries and distilleries" 80 2
"Carpet/Shawl weaving industry" 80 2
"Casual employees/government offices contigency and works" 80 2
"Cinema/Film/Theatre industry" 80 2
"Construction & maintenance of roads and buildings" 80 2
"Cooperative credit socieities/marketing societies" 80 2
"Dal/Flour/Rice mills" 80 2
"Dispensaries" 80 2
"Employment of non-teaching staff in non-grant aided educational institutions" 80 2
"Forestry/social forestry, timbering operations " 80 2
"Hospitals, nursing homes and private clinics" 80 2
"Loading and Unloading" 80 2
"Local Authority/Municipality/Municipal Corporation/Gram Panchayat" 80 2
"Manufacturing of tobacco/cigar/beedi" 80 2
"Motor body builders/Mechanical/local transport workshops" 80 2
"Oil mills" 80 2
"Petrol & diesel oil pumps industry " 80 2
"Plantation (cincona, rubber tea & coffee etc. )" 80 2
"Plywood industry " 80 2
"Potteries industry" 80 2
"Printing presss (lithiography, photography & similar other works)" 80 2
"Private security agency " 80 2
"Public motor transport" 80 2
"Saw mills" 80 2
"Shops & commercial establishments " 80 2
"Stone breaking & stone crushing " 80 2
"Sweeper & sanitation workers" 80 2
"Agarbatti Manufacturing" 115.6 3
"Agarwood industry" 115.6 3
"Agriculture" 115.6 3
"Aluminium Industry" 115.6 3
"Asbestos, cement and cocrete factories " 115.6 3
"Bakeries and confectionaries (including biscuits) manufactory " 115.6 3
"Blacksmith" 115.6 3
"Bought leaf factory" 115.6 3
"Breweries and distilleries" 115.6 3
"Brick/ Charcoal kiln industry" 115.6 3
"Buffalo and cow milk premises" 115.6 3
"Candle and wax industry" 115.6 3
"Canteen and clubs" 115.6 3
"Cement & cement products industry" 115.6 3
"Cement and Hume pipe/cement prestressed/cement products industry" 115.6 3
"Chakki mills" 115.6 3
"Chemical/pharmaceutical industry" 115.6 3
"Cinema/Film/Theatre industry" 115.6 3
"Cleaner" 115.6 3
"Construction & maintenance of roads and buildings" 115.6 3
"Contractor's establishments of forest department" 115.6 3
"Cooperative credit socieities/marketing societies" 115.6 3
"Cotton Textile, Cotton Ginning and Pressing, Spinning, Weaving including Handloom Weaving" 115.6 3
"Dairy & dairy products/Procurement, processing, & distribution of milk" 115.6 3
"Dal/Flour/Rice mills" 115.6 3
"Dispensaries" 115.6 3
"Earth cutting/removing/filling/lebelling etc." 115.6 3
"Electricity (production & distribution)" 115.6 3
"Employment in private coaching classes/school/technical institutions" 115.6 3
"Film production/motion picture/studios (production, distribution & publicity)" 115.6 3
"Fisheries and sea food industry" 115.6 3
"Flood control " 115.6 3
"Food processing/food preservation/food products " 115.6 3
"Forestry/social forestry, timbering operations " 115.6 3
"General engineering " 115.6 3
"Gold/silver covering, gold casting & ornaments" 115.6 3
"Goldsmith" 115.6 3
"Grass cutting/wood cutting" 115.6 3
"Gutkha and pan masala " 115.6 3
"Handicraft " 115.6 3
"Handloom and weaving industry" 115.6 3
"Horticulture" 115.6 3
"Hospitals, nursing homes and private clinics" 115.6 3
"Hotels and restaurants" 115.6 3
"Hotels, restaurants & eating houses" 115.6 3
"Hydro electric projects" 115.6 3
"Ice cream, ice candy manufactory" 115.6 3
"Ice factories and cold storage " 115.6 3
"Irrigation department" 115.6 3
"Jute & coir industry" 115.6 3
"Jute bailing industry" 115.6 3
"Khadi & Village industry" 115.6 3
"Khandsari/sugar factory " 115.6 3
"L.P.G distribution" 115.6 3
"Local Authority/Municipality/Municipal Corporation/Gram Panchayat" 115.6 3
"Manufacturing of fire works/explosives " 115.6 3
"Manufacturing of papers, and paper boards, cardboards" 115.6 3
"Manufacturing of photo & picture frames " 115.6 3
"Manufacturing of soaps & detergents" 115.6 3
"Manufacturing of tobacco/cigar/beedi" 115.6 3
"Manufacturing of trunks/buckets/tin plates, and shaping & printing " 115.6 3
"Metal rolling/re-rolling (non ferrous)" 115.6 3
end
label values new_state new_sta
label def new_sta 2 "Arunachal Pradesh", modify
label def new_sta 3 "Assam", modify
label def new_sta 31 "Andaman&Nicobar", modify
[/CODE]

Comment