Ties, no ties, ties, no ties ... [Nonparametrics]

posted by d_labes  – Berlin, Germany, 2010-09-13 15:21 (4964 d 06:56 ago) – Posting: # 5906
Views: 20,465

Dear Helmut!

Thanks for your very elaborate answer!

❝ Right. But if ties are considered, you are stirring up a hornets' nest!


I see :cool:.

❝ My quick and dirty solution:

PKt$pdiff    <- (PKt$P1 - PKt$P2)/2

PKt$sequence <- relevel(PKt$sequence, ref="TR")

...


Interesting: "relevel". Was not aware of that handy tool.
But astonishing the result: A change in order gives a different lower bound!

❝ Hhm; don't use library(exactRankTests)?


Seems a good recommendation. But it is claimed frequently that Rusers should use it in case of ties. Moreover coin has a much bigger footprint.

❝ ... they refer to Hollander and Wolfe. In my edition the word 'tie' is not even mentioned in the subject index...


Very strange. Everyone writing about rank methods is citing this.

❝ With my mid-1990 implementation in Rocky Mountain BASIC (not

❝ corrected for ties) I get:

   PE      90.26% CI

  0.25    -0.25 +0.75


Not 'correcting' for ties to obtain the CI is exactly what Charles Geyer recommends. With respect to the Wilcoxon sign rank test he states:
"First, neither ties nor zeros should make any difference in calculating point estimators or confidence intervals.
  • The point estimate is the median of the Walsh averages ...
  • The end points of the confidence interval are k in from each end of the sorted Walsh averages ...
  • Ties and zeros affect only hypothesis tests.
This is a bit of programmer brain damage (PBD) in the implementation of the wilcox.test and wilcox.exact functions. They change the way they calculate point estimates and confidence intervals when there are ties or zeros. But they shouldn't"
.
And this may be transferable to the rank-sum test :ponder:.
If one follows his code in the interval section of the Wilcoxon rank sum test one gets your Rocky results.

❝ Now for StatXact 6.1. using the coding according to Senn (2002) ...


What exactly did you here? Senn's Basic estimator? Then a test of sequence group differences would give an estimate of the period effect. Or am I wrong? See the expected period differences below.

❝ ... Open questions:

❝ • Signs... (Sigh!) I've checked the coding in all programs numerous times,

  but don't know what's going on here. Fishbrain.


I came across with: Sometimes the smaller group is used as the first, sometimes the coding order, sometimes the character order, sometimes the first occurred level.
My [image] uses the rule: smaller group and if both have the same n use the first occurred level as group 1. If this makes any sense is left to you.

❝ I guess the reason might be that you are comparing period differences rather than treatment differences.


The reason for using the period differences rather then the treatment diffs comes from the paper of Hauschke. It is based on the expected values
sequence   P1-P2
  TR       µ(T-R) + p1-p2
  RT      -µ(T-R) + p1-p2

Thus a test of the differences by sequence group gets rid of the period effects. This is not the case with the treatment diffs.

❝ ... I tried ties.method="mid-ranks" and ties.method="average-scores" and got:

Warning: In independence_test.IndependenceProblem(object, teststat = "scalar",  :

  additional arguments ties.method will be ignored :-(


I also observed this. Although mentioned on the help page it seems that the ties.method is not available in the wilcoxon_test function and other location tests of package coin. ties.method is only accepted by the function normal_test() which performs the "Exact Normal Quantile (van der Waerden) Test".

❝ If I exclude subjects with a zero difference ...


Called by Charles Geyer "The Zero fudge" :-D.

❝ ... You gave me a nice excuse not to spend the afternoon struggling with my income tax return.


If it is that horrible as here in Germanien I did you the favor very willingly :wink:. But the pity is that the problem with the Finanzamt does not vanish by sitting it out.

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
22,984 posts in 4,822 threads, 1,654 registered users;
54 visitors (0 registered, 54 guests [including 6 identified bots]).
Forum time: 22:18 CEST (Europe/Vienna)

You can’t fix by analysis
what you bungled by design.    Richard J. Light, Judith D. Singer, John B. Willett

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5