With this email I will be following up on this (some months old) post:

http://tolstoy.newcastle.edu.au/R/e7/help/09/06/0799.html

>From this I would assume that the following is also valid:

set.seed(29)
x <- gl(3, 10)
y <- rnorm(length(x), mean = c(0, 0, 1)[x])
d <- data.frame(y = y, x = x)
# w <- rep(2, nrow(d)) ### double each obs
w <- rep(c(1,5), nrow(d)/2)

kruskal_test(y ~ x, data = d[rep(1:nrow(d), w),]) # should be the same as
kruskal_test(y ~ x, data = d, weights = ~ w)

But the tests are not the same. Am I wrong somewhere here?

-- 
Armin Goralczyk
--
http://www.gwdg.de/~agoralc

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to