Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Wilcoxon signed-rank test for clustered data - flag: Stata 9/2 SE

From   "Harsha" <[email protected]>
To   "'Carlo Lazzaro'" <[email protected]>, <[email protected]>
Subject   st: RE: Wilcoxon signed-rank test for clustered data - flag: Stata 9/2 SE
Date   Tue, 5 Oct 2010 14:30:39 +0530

Thanks Carlo. I will look into Roger Newson's webpage. I will also run the
bootstrap and get back if I have some queries.

-----Original Message-----
From: Carlo Lazzaro [mailto:[email protected]] 
Sent: 05 October 2010 13:02
To: [email protected]
Cc: 'Harsha'
Subject: R: Wilcoxon signed-rank test for clustered data - flag: Stata 9/2

Hasha may want to consider a bootstrap procedure (that allows for
clusters)like in the following examples:
--------- code begins-----------------------------------
drop _all
set obs 10
input id time
            id       time
  1 0
  1 1
  2 0
  2 1
  3 0
  3 1
  4 0
  4 1
  5 0
  5 1
g acu_sight=2*uniform() if  time==0
replace acu_sight=5*uniform() if time==1
qui sum  acu_sight, d
bootstrap r(p50), reps(1000) cluster(id) : qui sum  acu_sight, d
--------- code ends-------------------------------------

In your query, the issue with clustering seems to be double, since you have
two operated eyes for each principal sample unit (ie: patient) and two
different points in time for measurement (before and after ocular surgery).
Please note that the previous example takes into account only one source of
clustering, that is visual acuity before and after the surgery. 
Last but absolutely not least, I would strongly recommend you to take a look
at Roger Newson's webpage ( 
Roger has addressed a lot of  his research activity in creating Stata
user-written programmes, some of those focusing on non parametric median

HTH and Kind Regards,

-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Harsha
Inviato: martedì 5 ottobre 2010 6.46
A: [email protected]
Oggetto: st: Wilcoxon signed-rank test for clustered data

Dear All,

I have a data comparing a few parameters in a group of patients before and
after a particular surgery. These surgeries are done on both eyes of a few
patients resulting in a correlated data. A few variables which I am trying
to compare are non-parametric. I am trying to apply Wilcoxon signed rank
test but am faced with the problem of the observations being not independent
between the 2 eyes of the patients. There is a program on SAS by Rosner's
group to use Wilcoxon for clustered data. Is there something similar in
stata? Is there any other ways to compare the medians between groups in
correlated data?

Kindly suggest.


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index