For a frequency analysis of more than two variables, use PROC FREQ to create n-way crosstabulations. A series of two-way tables is produced, with a table for each level of the other variables. For example, suppose you want to add the variable tables sex*weight*height; The order of the variables is important. In n-way tables, the last two variables of the TABLES statement become the two-way rows and columns. Variables that precede the last two variables in the TABLES statement stratify the crosstabulation tables. levels v tables sex*weight*height; ^ ^ rows + columns = two-way tables Notice the structure of the output that is produced by the program shown below. proc format; value wtfmt low-139='< 140' 140-180='140-180' 181-high='> 180'; value htfmt low-64='< 5''5"' 65-70='5''5-10"' 71-high='> 5''10"'; run; proc freq data=clinic.diabetes; tables sex*weight*height; format weight wtfmt. height htfmt.; run; |
|
|
|
|