/* module 6: problems 1, 2 */ /* 6.1 */ filename utility 'Utility.dat'; data one; infile utility; input date $ 1-6 telcost 9-15 fuelcost 17-22 emcost 25-29; totcost = telcost + fuelcost + emcost; year = substr(date,5,2); label telcost = Telephone Costs; label fuelcost = Fuel Costs; label emcost = Electricity Costs; label totcost = Total Costs; run; proc chart data=one; vbar telcost fuelcost emcost totcost; title "Utility Costs"; run; * these four distributions are positively skewed; /* 6.2 */ data two; set one; if 90 <= year <= 92; run; * utility data already sorted by year; proc chart data=two; by year; vbar fuelcost / midpoints = 25 to 150 by 25; title "Utility Costs by Year, Fuel"; run; proc chart data=two; by year; vbar totcost / midpoints = 100 to 300 by 40; title "Utility Costs by Year, Total"; run; proc chart data=two; by year; vbar telcost / midpoints = 40 to 140 by 20; title "Utility Costs by Year, Phones"; run; * The histograms for utility costs differ from year to year.;