First, you construct a formula that randomly shuffles the pain measurements among the three drugs. Under the null hypothesis of no effect, any of these allocations is as likely as any other. It follows that the F ratios obtained in this manner approximate the distribution of F ratios under the null hypothesis. Finally, you compare the observed value of the F ratio to the null distribution obtained by simulation.
1.
|
2.
|
Select Cols > New Columns.
|
3.
|
Type Pain Shuffled for Column Name.
|
4.
|
5.
|
In the function list, select Row > Col Stored Value.
|
6.
|
8.
|
From the list of functions, select Random > Col Shuffle.
|
Figure 10.8 Completed Formula
This formula randomly shuffles the entries in the pain column.
9.
|
Click OK in the Formula Editor window.
|
10.
|
Click OK in the Column Info window.
|
1.
|
Select Analyze > Fit Y by X.
|
2.
|
3.
|
4.
|
Click OK.
|
5.
|
Click the Oneway Analysis red triangle and select Means/Anova.
|
Figure 10.9 Analysis of Variance Report
Notice that the F ratio is 6.2780.
8.
|
In the Column to Switch In list, click Pain Shuffled.
|
9.
|
Next to Number of Samples, enter 1000.
|
10.
|
(Optional) Next to Random Seed, enter 456.
|
Figure 10.10 Completed Simulate Window
11.
|
Click OK.
|
In the table of simulated results, the columns for C. Total and Error are empty, since the F Ratio value in the Analysis of Variance table only applies to drug.
12.
|
In the table of simulated values, run the Distribution script.
|
The observed F ratio value of 6.2780 is represented with a red line in the histogram. This value falls in the upper 0.5% of the simulated null distribution of F ratios. This presents strong evidence that the three drugs differ in their effects on pain.