Testing Scale Parameters

advertisement
• Computing the ranks of data is only one of several possible socalled scoring methods that are in use... Section 2.7 reviews three of
them – we’ll look at the Van der Waerden scores: For X1, ... , XN as
our combined set of data (two groups m+n=N), the Van der Waerdan
score is defined as V(i) = F-1(i/(N+1))
i.e., the standard normal quantile of i/(N+1)
(in R, this is done with the qnorm function and the values for various
N are given in Table A.5)
• Once these scores are computed, we test the usual two-sample
hypothesis by doing a permutation test on the sum of the Van der
Waerden scores on one of the groups – if there are ties in the data,
we average the V. d. W. scores as we did with the ranks...
• See Table 2.7.1, p. 51 for a comparison. Try in R:
sum(qnorm(rank(c(granite,basalt))/13)[1:6])
• Try this test on problem #5, page 73... How does the p-value
relate to the one you computed with the Wilcoxon rank-sum statistic?
• FIGURE 2.8.1, page 52 – two distributions with the same
location parameters, but different scale parameters.
Tests for equality of scale
• Assume Xi from treatment 1 and Yj from treatment 2 as
follows: Xi = x and Yj = y ; where the
epsilons are iid with median = 0. Both the X's and the Y's have the
same location  but different scale parameters. The null hypothesis
is H0: 
• There are two nonparametric tests we'll consider:
•The Siegel-Tukey test
•The Ansari-Bradley test
Both of these tests require a different way of ranking the data:
• arrange the data from smallest to largest
• assign rank 1 to the smallest obs, rank 2 to the largest, rank 3 to
the next largest, rank 4 to the next smallest, etc.
• to get the Siegel-Tukey statistic, apply the Wilcoxon rank sum test
- the smaller ranks and smaller rank sum come from the group with
higher variability (see Fig. 2.8.1). Use the critical values of the
Wilcoxon statistic (Table A3 in our book) or in R
• to get the Ansari-Bradley statistic rank in the following way: rank 1 goes
to both the smallest and largest observations; rank 2 to both the next
smallest and the next largest; etc. Then compute the sum of the ranks of
treatment 1 - the problem is that p-values can't be obtained from Table 3
anymore…but both SAS and R have exact p-values available in their
software.
• Let's look at Example 2.8.1 on page 53:
– in SAS use PROC NPAR1WAY ST AB; CLASS TREATMENT;
EXACT ST AB; VAR OUNCES;
– here, TREATMENT is the grouping variable and OUNCES is the
response. ST stands for Siegel-Tukey and AB stands for AnsariBradley
– there is a function in R called ansari.test (the package is ctest - you
might have to load it?). Check out the help file on this function… I
haven't found one for doing the Siegel-Tukey test… can you write
one?
– another possibility is to use a permutation test based on the ratio of
the sample deviances… see p. 54 and Figure 2.8.2 for the RMD test.
Use R – do this for HW. That is, replicate the results of Example
2.8.2 and show your empirical p-value is around .07…
Download