Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Thu, 26 Aug 2010 12:00:56 -0400 |

-- "Now, some small centres have an empty cell, and the data from that centre is lost if Mantel-Haenszel methods are used. " This is not correct. If the cells counts are a,b,c,d, centers with only one empty cell will contribute either (a x d) or (b x c) , whichever is non-zero. The MH method is often studied under the assumption that the data arise from a fixed-effects logistic regression, so it's not surprising that the results are similar. Random effects logistic regression has more assumptions than the fixed effects model. I'm not expert in this area, but if the -re- and -fe- options produce different results, I tend to believe -fe-. One might try to check the -re- assumptions, e.g.: ************************ xtmelogit recovered treatment || clinic: predict pclinic, reffects level(clinic) egen ctag= tag(clinic) qnorm pclinic if ctag, mlab(n) ************************ (By the way: There is a minor glitch in Paul's code. To get an average 8 observations per clinic, the sample size generation line would have to be: gen n = int(runiform()*16+.5)) Steve - Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 On Thu, Aug 26, 2010 at 6:43 AM, Seed, Paul <paul.seed@kcl.ac.uk> wrote: > Dear Statalist, > > Adriaan Hoogendoorn has outcome and treatment data (both binary) from > 20 centres. As suggested by Joseph and Joseph, -xtlogit, i(clinic) fe- , > -xtlogit, i(clinic) re- and -cs, by(clinic)- will all give useable estimates > for the combined odds ratio, given a fairly large numbers of subjects in > every centre, and a good (50%) recovery rate. > > I tried a more realistic simulation with fewer subjects per centre, > different-sized centres (168 subjects total instead of 2,000), and a > lower recovery rate (30% instead of 50%). Now, some small centres have > an empty cell, and the data from that centre is lost if Mantel-Haenszel > methods are used. If there is only one outcome (two empty cells), > there will > be no estimated odds ratio for that centre, the centre is lost to > the fixed effects method as well. > > In the example below, 63 of 168 observations are lost to M-H and > 45 to fe. None are lost to re. > However, more simulations would be needed to get a clearer picture > of the effect on the power and size of the tests. > > **************************** > clear * > set more off > set seed `=date("2010-08-26", "YMD")' > set obs 20 > > generate byte clinic = _n > > expand 2 > bys clinic: gen treatment = _n-1 > > * Average of 8 observations per centre > gen n = int(runiform()*8+.5) > expand n > > * 20% recovery rate > gen recovered = runiform() < .2 > > 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 > > * Investigation of data problems > bys clinic : tab treatment recovered > recode clinic 1 2 5 12 15 18 19 20 = 0, into(zero_wt) > replace zero_wt = zero_wt == 0 > bys clinic (recovered) : gen no_recov = recovered[_N] == 0 > tab zero_wt no_recov > > > > exit > > > > > * > * 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/ > - * * 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/

**References**:**st: RE: Testing dependence in a 2x2 table for clustered observations***From:*"Seed, Paul" <paul.seed@kcl.ac.uk>

- Prev by Date:
**Re: st: looking for more efficient programming for randomly shuffling list of numbers** - Next by Date:
**Re: st: looking for more efficient programming for randomly shuffling list of numbers** - Previous by thread:
**st: RE: Testing dependence in a 2x2 table for clustered observations** - Next by thread:
**st: RE: Testing dependence in a 2x2 table for clustered observations** - Index(es):