Free Trial

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

Share this Page URL

5.9 Comparing Dependent Groups > 5.9.10 R Functions loc2dif and l2drmci - Pg. 200

200 Introduction to Robust Estimation and Hypothesis Testing strategy is to compute the median of difference scores, which tells us something about the typical difference for a randomly sampled couple. A second approach is to compute the median of the marginal distributions, which provides information about how the typical cholesterol level of the males compares to the typical level for all females. A third approach is to compute the difference between cholesterol levels for each man and woman, not just men and women who are married. This provides information about the typical difference between any man and any woman. 5.9.10 R Functions loc2dif and l2drmci The R function loc2dif((x, y = NULL, est = median, na.rm = T, plotit = F, xlab = " ", ylab = " ", ...) computes M D for the data stored in x (time 1 for example) and y (time 2). If y is not specified, it is assumed x is a matrix with two columns. The argument na.rm=T means that the function will eliminate any pair where one or both values are missing. If it is desired to use all of the available data, set na.rm=F. If the argument plotit=T, the function plots an estimate of the distribution of D. The R function