Wilcoxon for 2x2x4. "Not many things easier than that"? [Nonparametrics]

posted by Astea – Russia, 2023-02-14 19:44 (435 d 16:59 ago) – Posting: # 23465
Views: 1,527

Dear Smart People!
Could you please advise me how to extend Wilcoxon test for 4-period replicate study properly?
1. Do we need to use means of two periods of T's and R's? If yes, why do we need arithmetic means, why don't we need neither medians nor harmonic means nor so on?
2. How does Phoenix perform this calculation in Crossover object? According to guideline it is used only for 2x2 design, but it also works for 2x2x4 somehow.
Below is my suggested code (first two periods coincide with the example from the post). For this data Phoenix gave p=0.6863 - does it make any sense?
data<-c("Subject Sequence P1 P2 P3 P4
1 TRTR 2.0 2.0 3.0 3.0
2 RTRT 1.5 3.0 1.5 3.0
3 TRTR 2.0 2.0 2.0 3.0
4 RTRT 2.0 2.0 1.5 2.0
5 TRTR 3.0 2.0 2.0 1.5
6 RTRT 3.0 2.0 2.0 3.0
7 TRTR 1.5 2.0 1.5 2.0
8 RTRT 3.0 2.0 2.0 2.0
9 TRTR 2.0 3.0 1.5 3.0
10 RTRT 2.0 1.5 2.0 2.0
11 TRTR 1.5 2.0 2.0 2.0
12 RTRT 2.0 3.0 3.0 2.0
13 TRTR 1.5 3.0 3.0 2.0
14 RTRT 3.0 3.0 1.5 2.0")
tc <- textConnection(data)
PKt  <- read.table(tc, header=TRUE, strip.white=TRUE, as.is=TRUE)
close(tc)
 
PKt$pdiff <- PKt$P1+PKt$P3-PKt$P2-PKt$P4

 library(coin)
 PKt$Sequence <- as.factor(PKt$Sequence)
t1 <- wilcox_test(pdiff ~ Sequence, data=PKt, conf.int=TRUE, conf.level=0.9, distribution="exact")
print(t1)
#p=0.4353
t2 <- wilcox_test(pdiff ~ Sequence, data=PKt, conf.int=TRUE, conf.level=0.9, distribution="asymptotic")
print(t2)
#p=0.3983

"Being in minority, even a minority of one, did not make you mad"

Complete thread:

UA Flag
Activity
 Admin contact
22,993 posts in 4,828 threads, 1,655 registered users;
105 visitors (0 registered, 105 guests [including 7 identified bots]).
Forum time: 13:43 CEST (Europe/Vienna)

Never never never never use Excel.
Not even for calculation of arithmetic means.    Martin Wolfsegger

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