Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Categorical variables with stcurve


From   "CDSC - Verlander, Neville" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: Categorical variables with stcurve
Date   Fri, 17 Dec 2004 10:28:03 -0000

Dear Derek

Thank you very much for this help. Perhaps the word "legend" should be
inserted before the word "label" in the note message.

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 [email protected]
Sent: 16 December 2004 18:06
To: [email protected]
Subject: RE: st: Categorical variables with stcurve

Neville Verlander wrote:

> 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.
>
> 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,c
> 8=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,c
> 8=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,c
> 8=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,c
> 8=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,c
> 8=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,c
> 8=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,c
> 8=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"))

The "note: label truncated to 80 characters" message you get when you run
the above -stcurve- command is referring to the label used internally by
Stata when producing the graph.  It does not affect the -at- option used in
the command.  Neville has overwritten the default labels used in the legend
of the graph with his own labels (which is the best option).  If the
-legend- option was taken off the above command, the 80 character labels
(those that were truncated) would appear and would be hard to read.  Thus,
the note is just a good reminder to check the truncated labels when the
graph is produced and to possibly create new ones manually. 

Derek Wagner
<[email protected]>
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index