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]

RE: st: cox model with shared frailty

From   Tracy Clegg <>
Subject   RE: st: cox model with shared frailty
Date   Thu, 22 Apr 2010 11:30:08 +0100


Thanks Maarten, I had already started looking around for other computers
which was my main option, I was just checking I wasn?t missing something

Can I ask a probably naïve question.  If I run the model on a small sample
and say end up with a model that includes just 2 significant predictors out
of a possible 5, would I just check the final model with the 2 predictors on
the full dataset or do I need to go through the model building process

Many thanks for your suggestions,


-----Original Message-----
[] On Behalf Of Maarten buis
Sent: 22 April 2010 11:04
Subject: Re: st: cox model with shared frailty

--- On Thu, 22/4/10, Tracy Clegg wrote:
> Hi, I am having a few problems with running a cox
> propotional hazard model with a shared frailty.  
> My problem is that it is taking around 12 hours to 
> run a model with just one predictor, does anyone know
> how I can speed up the model?  I am using STATA/SE version 11. 
> In my data I have over 10,000 animals which are clustered 
> into 1,662 herds with between 6 and 12 animals in each herd.  
> To add a further complication I have 2 predictors which are 
> time varying.  

I can see why that is taking long. I would do two things:

1) build your model on a dataset that contains only a sample
of your total data. I would sample herds not animals. So 
say the variable identifying the herd is called herd, then
I would start my .do-file with

use complete_data.dta, clear
set seed 12345
bys herd: gen u = runiform()
bys herd (u): replace u = sum(u)
keep if u < .25  // keep 25% of the herds
drop u

2) Look around your departement to see if some computers 
are going to remain unused for some days (because of 
vacation/conference/field work/etc.), and ask those persons
if you can use their computer to run your complete model on.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

*   For searches and help try:

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