14.10.2013 Views

Analysis of the Vehicle Inventory and Use Survey for Trucks ... - About

Analysis of the Vehicle Inventory and Use Survey for Trucks ... - About

Analysis of the Vehicle Inventory and Use Survey for Trucks ... - About

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

groups <strong>for</strong> each region, we would generate a frequency table based on <strong>the</strong> unexp<strong>and</strong>ed sample data.<br />

Example <strong>of</strong> SAS Code to Generate Table <strong>of</strong> Number <strong>of</strong> Sample Records in each <strong>Vehicle</strong> Group <strong>for</strong> Each Region<br />

Proc freq data=Regions;<br />

Table VG*REGION;<br />

Run;<br />

Means <strong>and</strong> St<strong>and</strong>ard Deviation<br />

In summarizing <strong>the</strong> general characteristics <strong>of</strong> a certain vehicle type in <strong>the</strong> truck population, <strong>the</strong> mean <strong>and</strong> st<strong>and</strong>ard<br />

deviation are useful measures. There are two procedures in SAS <strong>for</strong> generating means: <strong>the</strong> Proc Means <strong>and</strong> <strong>the</strong> Proc<br />

GLM procedures. In each procedure, <strong>the</strong> ‘Freq EXPANF’ statement is added in order to weight <strong>the</strong> sample data in<br />

order to reflect <strong>the</strong> population. For example, if a record has 40,000 miles as its annual miles traveled <strong>and</strong> its<br />

EXPANF=10, <strong>the</strong>n this record states that 10 vehicles in <strong>the</strong> population have annual VMTs <strong>of</strong> 40,000 miles. Proc<br />

Means is used <strong>for</strong> 1997 VIUS analysis<br />

One should be aware that in both <strong>the</strong>se procedures <strong>the</strong> ‘Freq EXPANF’ statement will only accept integer values. If<br />

a real number is given, <strong>the</strong> procedure will only use <strong>the</strong> integer part <strong>of</strong> <strong>the</strong> number. EXPANF is a real number with<br />

values out to <strong>the</strong> two decimal places. In our analysis, we did not want <strong>the</strong> EXPANF to be truncated, so we<br />

multiplied <strong>the</strong> EXPANF <strong>for</strong> every record by 100, in order to shift <strong>the</strong> in<strong>for</strong>mation in <strong>the</strong> two decimal places over into<br />

<strong>the</strong> integer part <strong>of</strong> <strong>the</strong> number. Then we generated <strong>the</strong> means using this new EXPANF. In <strong>the</strong> results, <strong>the</strong><br />

population sizes associated with <strong>the</strong> means will be <strong>of</strong>f by a factor <strong>of</strong> 100. Dividing <strong>the</strong> population sizes by 100 will<br />

give <strong>the</strong> true sizes.<br />

General Format <strong>for</strong> Proc Sort Be<strong>for</strong>e running <strong>the</strong> Proc Means procedure, <strong>the</strong> Proc Sort procedure may have to be<br />

used to reorganize <strong>the</strong> data <strong>for</strong> analysis.<br />

Proc Sort data=dataset name;<br />

By Variable list;<br />

Run;<br />

General Format <strong>for</strong> Proc Means<br />

Proc Means data=dataset name;<br />

Var Variable list;<br />

By Variable list;<br />

Freq Variable;<br />

Run;<br />

Example <strong>of</strong> Proc Means procedure to Generate Mean VMT <strong>for</strong> Each Body Type Group<br />

Proc Sort data=VIUS;<br />

By BODTYP;<br />

Proc Means data=VIUS;<br />

Variable ANNMIL;<br />

By BODTYP;<br />

Freq EXPANF;<br />

Run;<br />

General Format <strong>for</strong> Proc GLM<br />

H - 16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!