# Re: st: clustering in proportional hazards models with stata/mp 10

 From "E. Paul Wileyto" To statalist@hsphsun2.harvard.edu Subject Re: st: clustering in proportional hazards models with stata/mp 10 Date Tue, 11 Sep 2007 16:03:49 -0400

Cox regression with shared frailty is really, really, really slow. Like get your results tomorrow slow. Works much better with parametric models.

P

Jeph Herrin wrote:

```I am surprised that Bill Gould did not mention:

stcox x1 x2, shared(center)

Is there a reason to rule it out of contention?

Roberto G. Gutierrez, StataCorp LP wrote:
```
```In response to Bill Gould's <wgould@stata.com> post, Daniel O. Koralek
<dkoralek@unc.edu> follows up with:

```
Thank you for your quite thorough response to my query. One quick question.
Stata will allow me to combine your solutions 1 and 3. And it does (at
least things move in the directions I would expect) what I would expect
(narrower confidence intervals for the estimates derived using solution 3.
But something about it doesn't seem valid. Any thoughts?
Solution 1 in Bill Gould's post refers to fitting a Cox model where you
cluster on groups (centers in this example). Solution 3 refers to instead
stratifying on these centers. As such, combining 1 and 3 would both cluster
and stratify on center, i.e.

. stcox x1 x2, strata(center) vce(cluster center)

Daniel expresses concern that the above may not be valid. It is perfectly
valid. As Bill explained, stratifying on center allows for different baseline
hazard functions for each center. However, the effects of the covariates x1
and x2 are assumed to be proportional on the hazard and, more importantly,
shared across centers. In estimating the standard errors of these (overall) covariate effects, one could also choose to cluster on center.

You stratify on center because you want the flexibility afforded by having
uniquely shaped hazards for each group. However, once you stratify, you are
still faced with deciding whether the subjects within each center are
to be treated as independent given the shared baseline hazard. If you do not
wish to make this additional assumption, then you should cluster on center as
well.

--Bobby
rgutierrez@stata.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

```*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

```
--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100

215-746-7147
Fax: 215-746-7140
epw@mail.med.upenn.edu
http://mail.med.upenn.edu/~epw/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/