The NPAR1WAY Procedure |
If you specify the HL option, PROC NPAR1WAY computes the Hodges-Lehmann estimate of location shift for two-sample data. PROC NPAR1WAY also provides confidence limits for the location shift. These confidence limits are sometimes called Moses confidence limits. You can set the level of the confidence limits with the ALPHA= option. The default is ALPHA=0.05, which produces 95% confidence limits. Additionally, you can request exact confidence limits for the location shift by specifying the HL option in the EXACT statement.
The Hodges-Lehmann estimator of location shift is associated with the Wilcoxon linear rank statistic. See Hollander and Wolfe (1999) and Hodges and Lehmann (1983) for details.
PROC NPAR1WAY computes the Hodges-Lehmann estimate as the median of all paired differences between observations in the two samples, which can be written as
The are observations in sample 1, the are observations in sample 2, and and denote the number of observations in sample 1 and sample 2, respectively. PROC NPAR1WAY uses the smaller of the two samples as sample 1. If both samples have the same number of observations, PROC NPAR1WAY uses the sample that appears first in the input data set as sample 1. Sample 1 is the same sample that PROC NPAR1WAY uses to compute the two-sample linear rank statistic.
Let denote the total number of differences, , and let denote the th value of among the ordered differences. When is an odd number, then the median difference is the value with rank ,
When is an even number, the median difference is the average of the values with ranks () and ,
Following Hollander and Wolfe (1999), the asymptotic lower and upper confidence limits for the location shift are
where is the largest integer less than or equal to , which is computed as
where is the th percentile of the standard normal distribution.
PROC NPAR1WAY displays the midpoint of the confidence interval , which can also be used as an estimate of location shift. See Lehmann (1963) for details. Additionally, PROC NPAR1WAY provides an estimate of the asymptotic standard error of based on the length of the confidence interval, which is computed as
If you specify the HL option in the EXACT statement, PROC NPAR1WAY computes exact confidence limits for the location shift between the two samples. As for the asymptotic confidence limits, you can set the confidence level with the ALPHA= option. The default is ALPHA=0.05, which produces 95% confidence limits.
PROC NPAR1WAY computes exact confidence limits for the location shift as described in Randles and Wolfe (1979, p. 180). PROC NPAR1WAY first generates the exact conditional distribution of the Mann-Whitney statistic, which equals the number of pairwise differences () that are positive, plus half the number of pairwise differences that are zero. The Mann-Whitney statistic is defined as
where
From the exact conditional distribution of the Mann-Whitney statistic , PROC NPAR1WAY chooses as the largest value such that . Rounding up to the nearest integer , the lower confidence limit equals the difference ( that has a rank of ().
To find the upper confidence limit, PROC NPAR1WAY chooses as the smallest value such that . Rounding down to the nearest integer , the upper confidence limit equals the difference () that has a rank of ().
Because this is a discrete problem, the confidence coefficient for these exact confidence limits is not exactly but is at least . Thus, these confidence limits are conservative.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.