Collapsed tables with summary | Other Commands | How to... |
stattables variable1 [variable2 variable3 ...][/Close][/M ][/Save="filename"][/stat=" st1 st2 st3 ....]
Command abbreviated form:
stattab
The statTABLES command is used for tabulation of summary measures and routine reporting.
Output is highly configurable and the user can specify heading, strata and pageshifts.
Requested statistics for var# are 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)
/mci (mean + 95% CI)
/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 age /by="SEX ILL" /stat="mean des" /n /NV 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 with options /N /NV.
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 shown) STATTABLES age /by="DISEASE SEX" /stat=mean (Numer of cases for each value of SEX and DISEASE, with the average AGE) STATTABLES age /by="DISEASE SEX" /stat=mean /SAVE="SUMMARY.REC" (Same as above, but results will be saved in file SUMMARY.REC)Notice:
/Save /M or /Stat (*) Other, see: remaining options |
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 |