next up previous contents index
Next: Maximization and Maximum Up: XLISP-STAT A Statistical Previous: Exercises

One Way ANOVA

XLISP-STAT allows the construction of normal one way analysis of variance models. The definitions needed are in the file oneway.lsp on the distribution disk. This file is not loaded automatically at start up; you should load it now, using the Load item on the File menu or the load command, to carry out the calculations in this section.

As an example, suppose we would like to model the data on cholesterol levels in rural and urban Guatemalans, examined in Section 3.2 , as a one way ANOVA model. The boxplots we obtained in Section 3.2 showed that the samples were skewed and the center and spread of the urban sample were larger than the center and spread of the rural sample. To compensate for these facts I will use a normal ANOVA model for the logarithms of the data:

> (def cholesterol (oneway-model (list (log urban) (log rural))))

Least Squares Estimates:

Group 0                 5.377172   (0.03624821)
Group 1                 5.099592   (0.03456131)

R Squared:             0.4343646
Sigma hat:             0.1621069
Number of cases:              42
Degrees of freedom:           40

Group Mean Square:     0.8071994   (1)
Error MeanSquare:     0.02627865   (40)

CHOLESTEROL
>

The function oneway-model requires one argument, a list of the lists or vectors representing the samples for the different groups. The model cholesterol can respond to all regression messages as well as a few new ones. The new ones are

:BOXPLOTS
:ERROR-MEAN-SQUARE
:ERROR-DF
:GROUP-DF
:GROUP-MEAN-SQUARE
:GROUP-NAMES
:GROUP-SUM-OF-SQUARES
:GROUPED-DATA
:STANDARD-DEVIATIONS



next up previous contents index
Next: Maximization and Maximum Up: XLISP-STAT A Statistical Previous: Exercises



Anthony Rossini
Fri Oct 20 10:29:17 EDT 1995