Dear Chris
Well, I only have 437 individuals with 608 total number of observations and
112051 total analysis time at risk, so took less than 30 seconds on a much
more modest computer!
Regards,
Neville
----------------------------------------------------------------------------
----------------------------------------------
Neville Verlander
Statistics Unit
Statistics, Modelling and Economics Department
Health Protection Agency Centre for Infections
61 Colindale Avenue
London
NW9 5EQ
Tel: (direct) (+44) 0208 3277426
Fax: (+44) 0208 7868
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chris Chung
Sent: 16 December 2004 11:06
To: [email protected]
Subject: Re: st: Categorical variables with stcurve
Categorical variables with stcurveDear Neville,
My apologies first if you expected this would be the answer. I was trying to
figure it out for you, but couldn't find the answer. Please let me ask you a
quick question. Would you mind telling me how long it took to get the result
of your multiple failure time model and your sample size? In my case, for
example, a multiple failure time model with two categorical variables and
the associated interaction term (with 70,000 observations of 7,000 subjects)
took more than a full day, even if I used a quad xeon 2.2 processor with 8
GB of RAM.
Thanks,
Chris
----- Original Message -----
From: CDSC - Verlander, Neville
To: '[email protected]'
Sent: Thursday, December 16, 2004 4:43 AM
Subject: st: Categorical variables with stcurve
Dear stata users
I am new to the stata list and recently posted a query on the above topic
but included the taboo word "Help" in the subject line, so I am re-sending.
My apologies if you have received the message below twice.
I have a question regarding STATA8.2 in Windows XP with which I hope you
could assist. My apologies if this is a trivial question.
I have multiple failure data (i.e each individual can fail more than once)
and 2 categorical variables (size 8 levels and country 13 levels). I want to
plot hazard and cumulative hazard plots (former to decide suitable
distribution for streg and latter for the customer) using stcurve for each
size, by country thus giving 13 graphs, each with 8 curves. To do the plots
adjusting for the covariates I use the stcurve command using the at1(),
at2(), etc options. As you know, one has to specify the variables in the
at1, at2 parts that were in the regression; any variables left out are
evaluated at their mean (0.5 for each dummy variable, which is meaningless).
Thus every dummy variable has to be included within the brackets and for
which level, eg _Isizegrp_2=0. However, there is a restriction of 80
charaters within each "at" after which STATA chops and ignores. In my case I
exceed this limit even on renaming, for instance, _Isizegrp_2 to s2. My
question is whether there is a way round this problem. I have looked at the
STATA predict command but this will only produce hazard predictions and not
cumulative hazards. I've tried assigning a macro to a part of the statement
and then including that macro in the "at" statements, but it didn't work! .
Here's some sample code to illustrate what I mean:
xi i.sizegrp i.cogrp;
ren _Isizegrp_2 s2;
ren _Isizegrp_3 s3;
ren _Isizegrp_4 s4;
ren _Isizegrp_5 s5;
ren _Isizegrp_6 s6;
ren _Isizegrp_7 s7;
ren _Isizegrp_8 s8;
ren _Icogrp_2 c2;
ren _Icogrp_3 c3;
ren _Icogrp_4 c4;
ren _Icogrp_5 c5;
ren _Icogrp_6 c6;
ren _Icogrp_7 c7;
ren _Icogrp_8 c8;
ren _Icogrp_9 c9;
ren _Icogrp_10 c10;
ren _Icogrp_11 c11;
ren _Icogrp_12 c12;
ren _Icogrp_13 c13;
streg s2 s3 s4 s5 s6 s7 s8 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13,
dist(logl) robust;
stcurve,
at1(s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at2(s2=1,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at3(s2=0,s3=1,s4=0,s5=0,s6=0,s7=0,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at4(s2=0,s3=0,s4=1,s5=0,s6=0,s7=0,s8=0c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=
0,c10=0,c11=0,c12=0,c13=0)
at5(s2=0,s3=0,s4=0,s5=1,s6=0,s7=0,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at6(s2=0,s3=0,s4=0,s5=0,s6=1,s7=0,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at7(s2=0,s3=0,s4=0,s5=0,s6=0,s7=1,s8=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
at8(s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=1,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9
=0,c10=0,c11=0,c12=0,c13=0)
ti("Country 1") legend(lab(1 "Size 1") lab(2 "Size 2") lab(3 "Size 3") lab(4
"Size 4")
lab(5 "Size 5") lab(6 "Size 6") lab(7 "Size 7") lab(8 "Size 8"))
cumhaz saving(c:\work\data\ewgli\cox1.gph,replace);
Thank you very much for your attention and any assistance you can provide.
Regards,
Neville
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------
Neville Verlander
Statistics Unit
Statistics, Modelling and Economics Department
Health Protection Agency Centre for Infections
61 Colindale Avenue
London
NW9 5EQ
Tel: (direct) (+44) 0208 3277426
Fax: (+44) 0208 7868
**************************************************************************<
br>The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of the named
addressee(s). It may not be disclosed to any other person without the
express authority of the HPA, or the intended recipient, or both. If you are
not the intended recipient, you must not disclose, copy, distribute or
retain this message or any part of it. This footnote also confirms that this
EMail has been swept for computer viruses, but please re-sweep any
attachments before opening or saving. HTTP://www.HPA.org.uk
**************************************************************************
*
* 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/
-----------------------------------------
**************************************************************************
The information contained in the EMail and any attachments is confidential
and intended solely and for the attention and use of the named
addressee(s). It may not be disclosed to any other person without the
express authority of the HPA, or the intended recipient, or both. If you
are not the intended recipient, you must not disclose, copy, distribute or
retain this message or any part of it. This footnote also confirms that
this EMail has been swept for computer viruses, but please re-sweep any
attachments before opening or saving. HTTP://www.HPA.org.uk
**************************************************************************
*
* 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/