Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
10.5.∗General Rank Scores 615

Table 10.5.1:Data for Example 10.5.3

Sample 1 (X) Sample 2 (Y)
Data Ranks Normal Scores Data Ranks Normal Scores
51.9 15 − 0. 04044 59.2 24 0. 75273
56.9 23 0. 64932 49.1 14 − 0. 12159
45.2 11 − 0. 37229 54.4 19 0. 28689
52.3 16 0. 04044 47.0 13 − 0. 20354
59.5 26 0. 98917 55.9 21 0. 46049
41.4 4 − 1. 13098 34.9 3 − 1. 30015
46.4 12 − 0. 28689 62.2 28 1. 30015
45.1 10 − 0. 46049 41.6 6 − 0. 86489
53.9 17 0. 12159 59.3 25 0. 86489
42.9 7 − 0. 75273 32.7 1 − 1. 84860
41.5 5 − 0. 98917 72.1 29 1. 51793
55.2 20 0. 37229 43.8 8 − 0. 64932
32.9 2 − 1. 51793 56.8 22 0. 55244
54.0 18 0. 20354 76.7 30 1. 84860
45.0 9 − 0. 55244 60.3 27 1. 13098

Example 10.5.3.As a numerical illustration, we consider some generated nor-
mal observations. The first sample, labeledX, was generated from aN(48, 102 )
distribution, while the second sample,Y, was generated from aN(58, 102 ) distribu-
tion. The data are displayed in Table 10.5.1, but they can also be found in the file
examp1053.rda. Also in Table 10.5.1, the ranks and the normal scores are exhib-
ited. We consider tests of the two-sided hypothesesH 0 :Δ=0versusH 1 :Δ =0
for the Wilcoxon, normal scores, and Studenttprocedures. The next segment of R
code returns the results in Table 10.5.2. As we have used the R functionst.test
andwilcox.testin the last section we do not show their results in the segment
but we do show the results for the normal scores. The code assumes that the R
vectorsxandycontain the respective samples.
t.test(y,x); wilcox.test(y,x,conf.int=T)
zed=c(x,y); ind=c(rep(0,15),rep(1,15)); rz=rank(z)
phis=qnorm(rz/31); varns= ((1515)/(3029))sum(phis^2)
nstst=sum(ind
phis); stdns=nstst/sqrt(varns)
pns =2*(1-pnorm(abs(stdns)))
nstst; stdns; pns
3.727011; 1.483559; 0.137926
To complete the summary in Table 10.5.2 we need the estimate of Δ based on the
rank-based normal scores process. Kloke and McKean (2014) discuss the use of the
CRAN packageRfitfor this computation. If this package is installed in the users
area then the following command computes this estimate of Δ:
rfit(zed~ind,scores=nscores)$coef[2]
5.100012

Free download pdf