Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

5 Comparing Two Groups > 5.9 Comparing Dependent Groups - Pg. 190

190 I Introduction to Robust Estimation and Hypothesis Testing Example If for the rst group we have 7 successes among 12 observations, for the second group we have 22 successes among 25 observations, the command twobinom(7,12,22,25) returns a p-value of .044, this is less than .05, so we would reject with = .05. The .95 con dence interval for p 1 - p 2 returned by the command twobici(7,12,22,25) is (-0.61, 0.048), this interval contains zero, so in contrast to the Storer-Kim method we do not reject the hypothesis H 0 : p 1 = p 2 , the only point being that different conclusions might be reached depending on which method is used. The con dence interval returned by bi2KMS is (-0.60, 0.025). I 5.8.5 Comparing Discrete Distributions: R Functions binband and disc2com When dealing with two discrete distributions, where the sample space is small, it might be desired to test H 0 : P(X = x) = P(Y = x) for each value x in the sample space. This can be done with the R function binband(x,y,KMS=F). By default, the individual probabilities are compared using the Storer­Kim method. Otherwise method KMS is used. The R function disc2com(x,y,alpha=0.05,nboot=500,SEED=TRUE) performs a global test using a bootstrap extension of the Storer­Kim method assuming the R package mc2d has been installed. 5.9 Comparing Dependent Groups There are many ways two dependent groups might be compared, but as usual, no attempt is made to list all the possibilities. Rather, the goal is to describe methods similar in spirit to the methods for independent groups covered in this chapter. 5.9.1 A Shift Function for Dependent Groups Lombard (2005) derived an extension of the shift function, described in Section 5.1, to dependent groups (cf. Wilcox, 2006f). Let (X 1 , Y 1 ), . . . , (X n , Y n ) be a random sample of www.elsevierdirect.com