The Kolmogorov-Smirnov (one-sample) test determines whether a dataset matches a particular distribution (for this test, the normal distribution). The test has the advantage of making no assumption about the distribution of data. (Non-parametric and distribution free) Note that this generality comes at some cost: other tests (e.g., the Student's t-test) may be more sensitive if the data meet the requirements of the test. The Kolmogorov-Smirnov test is generally less powerful than the tests specifically designed to test for normality. This is especially true when the mean and variance are not specified in advance for the Kolmogorov-Smirnov test, which then becomes conservative. Further, the Kolmogorov-Smirnov test will not indicate the type of nonnormality, e.g., whether the distribution is skewed or heavy-tailed. Examination of the skewness and kurtosis, and of the histogram, boxplot, and normal probability plot for the data may show why the data failed the Kolmogorov-Smirnov test.
In this test, the user can specify group-by variables (GBVs) so a separate test will be done for every unique set of values of the GBVs.