Bookmark and Share

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


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

RE: st: RE: Testing dependence in a 2x2 table for clustered observations


From   "Hoogendoorn, Adriaan" <A.Hoogendoorn@ggzingeest.nl>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Testing dependence in a 2x2 table for clustered observations
Date   Mon, 6 Sep 2010 13:04:40 +0200

Thank you, Steve, Paul, Joseph and Joseph for your comments in this thread.

Things change dramatically if all patients at clinics are either all treated or all untreated (clinics are randomly assigned), as in the code below:

Do you have any idea what to do in this case?

clear *
set more off
set seed `=date("2010-08-26", "YMD")'
set obs 20
generate byte clinic = _n

* Half the clinics use treatment
generate treatment = (_n<=10)

* Average of 8 observations per centre
gen n = int(runiform()*8+.5)
expand n

* 20% recovery rate
gen recovered = runiform() < .2

* THESE TYPES OF ANALYSIS DO NOT WORK IN THIS SITUATION!
cs recovered treatment , by(clinic) or
mhodds recovered treatment , by(clinic)
xtlogit recovered treatment, i(clinic) fe or nolog
xtlogit recovered treatment, i(clinic) re or nolog


Kind regards,
Adriaan Hoogendoorn
GGZ inGeest, Amsterdam

Dit e-mailbericht is uitsluitend bestemd voor de geadresseerde. Als dit bericht niet voor u bestemd is, wordt u verzocht dit aan de afzender te melden en het bericht te vernietigen. Het is niet toegestaan de inhoud van dit bericht verder te verspreiden of te gebruiken. Voor meer informatie over GGZ inGeest: www.ggzingeest.nl.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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