Hello there:
Q: I would like to create a histogram showing the PROPORTION OF CAR MECHANICS vs the mean no of CAR repairs done per year, PER car mechanic
See picture:
**Repair - if a repair was performed (1) or not (0)
**Totaldoneperyear - total no of repairs performed each year generated from:
I've tried this:
However this generates differ panels for each mechanic. I would like them all in one panel as seen above (in my very amateurish drawing)
Can anyone help?
Q: I would like to create a histogram showing the PROPORTION OF CAR MECHANICS vs the mean no of CAR repairs done per year, PER car mechanic
See picture:
**Repair - if a repair was performed (1) or not (0)
**Totaldoneperyear - total no of repairs performed each year generated from:
Code:
bys mechanic repairyear: egen totaldoneperyear=sum(repair)
Code:
clear input float(repair repairdate) str1 mechanic float(repairyear totaldoneperyear) 1 14610 "1" 2000 1 0 15310 "1" 2001 0 1 15745 "1" 2003 1 0 16109 "1" 2004 0 0 16468 "1" 2005 0 1 17867 "2" 2008 1 0 17932 "2" 2009 0 1 18298 "2" 2010 2 1 18303 "2" 2010 2 1 19029 "2" 2012 1 end format %td repairdate
I've tried this:
Code:
histogram totaldoneperyear, freq by(mechanic)
Can anyone help?
Comment