29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

The TABULATE Procedure 4 Calculating Percentages 1233<br />

pctsum=’% of column’ v<br />

pctsum=’% of all customers’), w<br />

type*expenditures/rts=40;<br />

title ’Expenditures in Each Division’;<br />

run;<br />

The TABLE statement creates a row for each value of Division and a column for each<br />

value of Type. Because Type is crossed with Expenditures, the value in each cell is the<br />

sum of the values of Expenditures for all observations that contribute to the cell.<br />

Within each row, the TABLE statement nests four statistics: SUM and three different<br />

calculations of PCTSUM (see Figure 48.5 on page 1233). Each occurrence of PCTSUM<br />

uses a different denominator definition.<br />

Figure 48.5<br />

Three Different Uses of the PCTSUM Statistic with Sums Highlighted<br />

Expenditures in Each Division 1<br />

--------------------------------------------------------<br />

| | Type |<br />

| |---------------------|<br />

| | 1 | 2 |<br />

| |----------+----------|<br />

| | Expend | Expend |<br />

|--------------------------------+----------+----------|<br />

|Division | | | |<br />

|-----------+--------------------| | |<br />

|1 |Expenditures | $7,477.00| $5,129.00|<br />

| |--------------------+----------+----------|<br />

| |% of row ➊ | 59.31| 40.69|<br />

| |--------------------+----------+----------|<br />

| |% of column ❷ | 16.15| 13.66|<br />

| |--------------------+----------+----------|<br />

| |% of all customers ❸| 8.92| 6.12|<br />

|-----------+--------------------+----------+----------|<br />

|2 |Expenditures |$19,379.00|$15,078.00|<br />

| |--------------------+----------+----------|<br />

| |% of row | 56.24| 43.76|<br />

| |--------------------+----------+----------|<br />

| |% of column | 41.86| 40.15|<br />

| |--------------------+----------+----------|<br />

| |% of all customers | 23.11| 17.98|<br />

|-----------+--------------------+----------+----------|<br />

|3 |Expenditures | $5,476.00| $4,729.00|<br />

| |--------------------+----------+----------|<br />

| |% of row | 53.66| 46.34|<br />

| |--------------------+----------+----------|<br />

| |% of column | 11.83| 12.59|<br />

| |--------------------+----------+----------|<br />

| |% of all customers | 6.53| 5.64|<br />

|-----------+--------------------+----------+----------|<br />

|4 |Expenditures |$13,959.00|$12,619.00|<br />

| |--------------------+----------+----------|<br />

| |% of row | 52.52| 47.48|<br />

| |--------------------+----------+----------|<br />

| |% of column | 30.15| 33.60|<br />

| |--------------------+----------+----------|<br />

| |% of all customers | 16.65| 15.05|<br />

--------------------------------------------------------<br />

u sums the values of Expenditures for all occurrences of Type within the<br />

same value of Division. Thus, for Division=1, the denominator is $7,477 + $5,129.<br />

v sums the frequency counts for all occurrences of Division within the<br />

same value of Type. Thus, for Type=1, the denominator is $7,477 + $19,379 +<br />

$5,476 + $13,959.<br />

w The third use of PCTN has no denominator definition. Omitting a denominator<br />

definition is the same as including all class variables in the denominator

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

Saved successfully!

Ooh no, something went wrong!