In this chapter the statistical commands available are described. This manual does not seek to replace a statistics textbook, so only minimal guidance will be given as to which tests are appropiate for which data. The field is complex and controversial and if the user is not sure which test to use he or she should consult a textbook or professional statistician for guidance.
Broadly speaking the tests may be divided according to whether they provide parametric, nonparametric or categorical analyses. Data which are suitable for parametric analyses should be continuous rather than discrete, and ideally should follow a normal distribution though different tests are more or less robust to departures from normality. The measurements should resemble the markings on a ruler in that the distance between each pair of consecutive numbers is always equal, with the proviso that to satisfy the requirement that the measures are continuous the "marks" should be close together. Data for nonparametric analyses need not be so distributed, but the values must be ordinal in the sense that it is always possible to say that one value is greater than another. All the nonparametric tests supplied, Wilcoxon's rank sum, Wilcoxon's signed rank, Kendall's rank correlation coefficient and the Kruskall- Wallis test work by first assigning ranks to the values and then comparing ranks rather than the values themselves. Categorical information lacks even this quality of being ordered, so that one can simply say that a quality is different, but not greater or less than another.
Measurements for parametric analyses might include height, weight, blood pressure, temperature. It is often acceptable to apply it to age in years provided that the total age range is reasonably large since then it can approximate to a continuous distribution.
Measurements for nonparametric analyses might include age if it were broken down by decades, an assessment scale with only five points, social class, rank score on a measure, number of children, etc.
Categorical data might include gender, marital status, ethnic origin, etc.
It is always possible to treat continuous data as if it were discontinuous, and any data may be treated as categorical. However if the data is distributed such that a parametric test is feasible, this should be used in preference to a nonparametric one since the parametric test will generally have more power. However if the measures are unsuitable for parametric analyses then the nonparametric tests should be used, since otherwise spurious results may be produced. Unless there are good reasons to use cut-off points to divide ordinal data into categories, categorical tests should not be used on ordinal data because again power will be lost.
No specific test of normality is provided, and the user's understanding of the nature of the quantity which the data measures is crucial. However examining the frequency distribution, skewness and kurtosis may be helpful, and also note should be taken of how closely together lie the mean, median and mode. If they are far apart then the data must be skewed. Sometimes data which is quite non- normally distributed can be converted to data that more closely follows a normal distribution by applying a mathematical transformation. One of these is simply to take the log of the value. Other suggestions are described in textbooks.
The chi-squared test compares data divided into categories in two different ways. The Wilcoxon rank sum test compares nonparametric data between two groups defined categorically. The Kruskall-Wallis one way analysis of variance does the same for more than two groups. The Wilcoxon signed rank sum test can be used to compare pairs of measures in two different columns. Kendall's rank correlation coefficient compares the relationship of two nonparametric measures. Student's t test compares a parametric measure in two groups defined categorically, and the analysis of variance does the same thing with more than two groups. The standard (Pearson's) correlation coefficient with linear regression compares data from two parametric measures. Multiple linear regression compares data from one parametric measure with data from several other parametric measures (though for some purposes this requirement may be relaxed, for example in discriminant analysis). Principal components analysis analyses data from several measures, which are all taken to be parametric.
Summmary
Chisq
Wilcoxon
Kendall's rank correlation coefficient
Ttest
Linear regression and correlation coefficient
Anova
Multiple regression
Principal component analysis