I am not sure about how to create oneway frequency table in Stata that I can export to Latex, say with three columns - the occupation name/label, number of people in the occupation category, and percentage of people in each occupation category.
Most manuals/examples online that I was able to find highlight the procedure for publication style tables for summary statistics, regression tables and cross tables, but not simple tabulation outputs. Thus, i would appreciate any help on this.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int occ2010 4700 30 430 4030 4600 5700 2300 4210 4510 4250 4230 4810 3740 1020 4700 5400 7330 1310 4810 7200 540 540 3600 9600 9100 7200 2000 3410 3930 4720 4810 3820 7260 4700 9620 4610 8750 4010 5120 7200 9130 2200 4000 4720 2000 4760 9620 4740 6515 1460 4720 5530 5550 6660 140 4700 4430 3930 910 9600 540 3930 2320 2310 1410 540 4520 8140 4220 4720 720 2910 520 4700 4610 3600 4060 4000 3600 160 3130 2140 430 8965 220 5700 4250 4110 4720 5510 5700 3130 5240 8220 4720 4820 9130 4010 2720 2340 end label values occ2010 occ2010_lbl label def occ2010_lbl 30 "Managers in Marketing, Advertising, and Public Relations", modify label def occ2010_lbl 140 "Industrial Production Managers", modify label def occ2010_lbl 160 "Transportation, Storage, and Distribution Managers", modify label def occ2010_lbl 220 "Constructions Managers", modify label def occ2010_lbl 430 "Managers, nec (including Postmasters)", modify label def occ2010_lbl 520 "Wholesale and Retail Buyers, Except Farm Products", modify label def occ2010_lbl 540 "Claims Adjusters, Appraisers, Examiners, and Investigators", modify label def occ2010_lbl 720 "Meeting and Convention Planners", modify label def occ2010_lbl 910 "Credit Counselors and Loan Officers", modify label def occ2010_lbl 1020 "Software Developers, Applications and Systems Software", modify label def occ2010_lbl 1310 "Surveyors, Cartographers, and Photogrammetrists", modify label def occ2010_lbl 1410 "Electrical and Electronics Engineers", modify label def occ2010_lbl 1460 "Mechanical Engineers", modify label def occ2010_lbl 2000 "Counselors", modify label def occ2010_lbl 2140 "Paralegals and Legal Assistants", modify label def occ2010_lbl 2200 "Postsecondary Teachers", modify label def occ2010_lbl 2300 "Preschool and Kindergarten Teachers", modify label def occ2010_lbl 2310 "Elementary and Middle School Teachers", modify label def occ2010_lbl 2320 "Secondary School Teachers", modify label def occ2010_lbl 2340 "Other Teachers and Instructors", modify label def occ2010_lbl 2720 "Athletes, Coaches, Umpires, and Related Workers", modify label def occ2010_lbl 2910 "Photographers", modify label def occ2010_lbl 3130 "Registered Nurses", modify label def occ2010_lbl 3410 "Health Diagnosing and Treating Practitioner Support Technicians", modify label def occ2010_lbl 3600 "Nursing, Psychiatric, and Home Health Aides", modify label def occ2010_lbl 3740 "Firefighters", modify label def occ2010_lbl 3820 "Police Officers and Detectives", modify label def occ2010_lbl 3930 "Security Guards and Gaming Surveillance Officers", modify label def occ2010_lbl 4000 "Chefs and Cooks", modify label def occ2010_lbl 4010 "First-Line Supervisors of Food Preparation and Serving Workers", modify label def occ2010_lbl 4030 "Food Preparation Workers", modify label def occ2010_lbl 4060 "Counter Attendant, Cafeteria, Food Concession, and Coffee Shop", modify label def occ2010_lbl 4110 "Waiters and Waitresses", modify label def occ2010_lbl 4210 "First-Line Supervisors of Landscaping, Lawn Service, and Groundskeeping Workers", modify label def occ2010_lbl 4220 "Janitors and Building Cleaners", modify label def occ2010_lbl 4230 "Maids and Housekeeping Cleaners", modify label def occ2010_lbl 4250 "Grounds Maintenance Workers", modify label def occ2010_lbl 4430 "Entertainment Attendants and Related Workers, nec", modify label def occ2010_lbl 4510 "Hairdressers, Hairstylists, and Cosmetologists", modify label def occ2010_lbl 4520 "Personal Appearance Workers, nec", modify label def occ2010_lbl 4600 "Childcare Workers", modify label def occ2010_lbl 4610 "Personal Care Aides", modify label def occ2010_lbl 4700 "First-Line Supervisors of Sales Workers", modify label def occ2010_lbl 4720 "Cashiers", modify label def occ2010_lbl 4740 "Counter and Rental Clerks", modify label def occ2010_lbl 4760 "Retail Salespersons", modify label def occ2010_lbl 4810 "Insurance Sales Agents", modify label def occ2010_lbl 4820 "Securities, Commodities, and Financial Services Sales Agents", modify label def occ2010_lbl 5120 "Bookkeeping, Accounting, and Auditing Clerks", modify label def occ2010_lbl 5240 "Customer Service Representatives", modify label def occ2010_lbl 5400 "Receptionists and Information Clerks", modify label def occ2010_lbl 5510 "Couriers and Messengers", modify label def occ2010_lbl 5530 "Meter Readers, Utilities", modify label def occ2010_lbl 5550 "Postal Service Mail Carriers", modify label def occ2010_lbl 5700 "Secretaries and Administrative Assistants", modify label def occ2010_lbl 6515 "Roofers", modify label def occ2010_lbl 6660 "Construction and Building Inspectors", modify label def occ2010_lbl 7200 "Automotive Service Technicians and Mechanics", modify label def occ2010_lbl 7260 "Vehicle and Mobile Equipment Mechanics, Installers, and Repairers, nec", modify label def occ2010_lbl 7330 "Industrial and Refractory Machinery Mechanics", modify label def occ2010_lbl 8140 "Welding, Soldering, and Brazing Workers", modify label def occ2010_lbl 8220 "Metal workers and plastic workers, nec", modify label def occ2010_lbl 8750 "Jewelers and Precious Stone and Metal Workers", modify label def occ2010_lbl 8965 "Other production workers including semiconductor processors and cooling and freezing equipment operators", modify label def occ2010_lbl 9100 "Bus and Ambulance Drivers and Attendants", modify label def occ2010_lbl 9130 "Driver/Sales Workers and Truck Drivers", modify label def occ2010_lbl 9600 "Industrial Truck and Tractor Operators", modify label def occ2010_lbl 9620 "Laborers and Freight, Stock, and Material Movers, Hand", modify
0 Response to Generating One Way Frequency Table in Stata for Latex
Post a Comment