Collapsed tables with summary | Other Commands | How to... |
stattables variable1 [variable2 variable3 ...][/Close][/M /Missing][/Save="filename"][/st1="var1, var2...] [/st2="var1, var2"]
Command abbreviated form:
stattab
The TABLES command does a cross-tabulation of the specified variables (variables#). If statistics (st#) are requested
then the requested statistic for var# is calculated and displayed.
Statistics can be:
/Mean /SD /min /p5 /p10 /p25 /p50
/p75 /p90 /p95 /max /sum
/des (which includes Min, P50 and Max)
/irq (p25-p50)
/idr (p10-p90)
/isr (p5-p95)
/mv (counts of defined missing values and blanks)
If the save option is used, the results will be saved in the file named (a rec file).
Variables included in the statistic options (var#) must be numeric.
At least the first variables must be specified.
Output:
stattables SEX ILL /Mean="AGE" /DES="AGE" will produce:
SEX ILL N Nage MEAage MINAGE MEDAGE MAXAGE
F N 14 14 34.00 9 35 69
F Y 30 30 38.10 8 39 72
M N 15 15 31.93 7 25 65
M Y 16 16 41.44 3 44 77
The number (N and Nvarname) of records matching each category is given. The requested statistics are displayed in the following columns.
The real output can be different depending on the options used (see below)
STATTABLES SEX ILL (Number of records for each value of SEX and ILL) STATTABLES DISEASE SEX /MEAN="AGE" (Numer of cases for each value of SEX and DISEASE, with the average AGE) STATTAB DISEASE SEX /MEAN="AGE" /SAVE="SUMMARY.REC" (Same as above, but results will be saved in file SUMMARY.REC)Notice:
/Save /M or /Missing /St (*) |
Saves the results in the specified file (REC) Includes observations with missing data (.) in that field Calculates the specified statistic. Write any of the statistic available and the name of the numeric variable(s) |
No output variables | If you wish to get the results in a variable, please use the /save option |
set table design stat=line[box][filled][system] |
Main tables design will be acording with this command. The default value is line |
No specific references |