The following steps display information about the data set Sashelp.Gas and create Figure B.5:
title 'Exhaust Emissions Data'; proc contents data=sashelp.gas varnum; ods select position; run; title 'The First Five Observations Out of 171'; proc print data=sashelp.gas(obs=5); run; title 'The Fuel Type Variable'; proc freq data=sashelp.gas; tables fuel; run;
Figure A.5: Exhaust Emissions Data
| Exhaust Emissions Data |
| Variables in Creation Order | ||||
|---|---|---|---|---|
| # | Variable | Type | Len | Label |
| 1 | Fuel | Char | 8 | |
| 2 | CpRatio | Num | 8 | Compression Ratio |
| 3 | EqRatio | Num | 8 | Equivalence Ratio |
| 4 | NOx | Num | 8 | Nitrogen Oxide |
| The First Five Observations Out of 171 |
| Obs | Fuel | CpRatio | EqRatio | NOx |
|---|---|---|---|---|
| 1 | Ethanol | 12 | 0.907 | 3.741 |
| 2 | Ethanol | 12 | 0.761 | 2.295 |
| 3 | Ethanol | 12 | 1.108 | 1.498 |
| 4 | Ethanol | 12 | 1.016 | 2.881 |
| 5 | Ethanol | 12 | 1.189 | 0.760 |
| The Fuel Type Variable |
| Fuel | Frequency | Percent | Cumulative Frequency |
Cumulative Percent |
|---|---|---|---|---|
| 82rongas | 9 | 5.26 | 9 | 5.26 |
| 94%Eth | 25 | 14.62 | 34 | 19.88 |
| Ethanol | 90 | 52.63 | 124 | 72.51 |
| Gasohol | 13 | 7.60 | 137 | 80.12 |
| Indolene | 22 | 12.87 | 159 | 92.98 |
| Methanol | 12 | 7.02 | 171 | 100.00 |