Bookmark and Share

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, is already up and running.

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

Re: st: cox model with shared frailty

From   Maarten buis <>
Subject   Re: st: cox model with shared frailty
Date   Thu, 22 Apr 2010 10:03:45 +0000 (GMT)

--- 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index