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

Re: st: At risk table


From   Horea Feier <[email protected]>
To   [email protected]
Subject   Re: st: At risk table
Date   Mon, 6 Jun 2005 15:49:04 +0300

Yes, I am aware of -stsatrisk- (please see my first email).

However, it places by default the values of the subjects at risk
inside the graphregion.

I was looking for a way to place them instead underneath the graph,
in a table, as some journals (eg New England Journal of Medicine)
require.


On Jun 6, 2005, at 3:09 PM, Nick Cox wrote:

> On the contrary, Svend referred to -stsatrisk-. See his
> email again.
>
> Nick
> [email protected]
>
> Horea Feier
>
>
>> Thank you for your example script...It shows that you can insert the
>> table, more or less "by hand", but it works.
>>
>> In fact I was looking for some program which could create this table
>> automatically, so to say, and be able to place it in a specified
>> position.
>>
>>    I understand that you are not aware of such a contributed program?
>>
>>    Thanks for your great example anyway, Horea
>>
>>
>> On Jun 5, 2005, at 4:17 PM, Svend Juul wrote:
>>
>>
>>> Horea asked how to display a number at risk table below a Kaplan-
>>> Meier graph.
>>>
>>> The is the intent of -stsatrisk-, but the author correctly warns
>>> that it does not always work well.
>>>
>>> It can be done, however, but not easily. Start with running -
>>> stsatrisk- to get the numbers right. Below I show an example of
>>> constructing the table. It works, but it required quite a bit of
>>> trial and error. I used -scheme lean1- putting the legend to the
>>> right of the plot area, to avoid conflict between legend and table.
>>>
>>> Hope this helps
>>> Svend
>>> ----------------------------------------------------
>>> set scheme lean1
>>> sts graph                                         ///
>>>   ,                                               ///
>>>   by(screengr) per(1000)                          ///
>>>   fail                                            ///
>>>   clpattern(- l)                                  ///
>>>   title("")                                       ///
>>>   graphregion(margin(b+6))                        ///
>>>   plotregion(margin(l=0 b=0))                     ///
>>>   xtitle(Months of follow-up)                     ///
>>>   ytitle("Cumulated AAA mortality per 1000")      ///
>>>   xscale(range(0 60))                             ///
>>>   xlabel(0(12)60)                                 ///
>>>   ylabel(0(1)5 , format(%1.0f) nogrid)            ///
>>>   legend(label(1 "Controls") label(2 "Invited"))  ///
>>>   text(-0.93 -5 "Invited" , size(*0.8) place(w))  ///
>>>   text(-1.2 -5 "Controls" , size(*0.8) place(w))  ///
>>>   text(-0.93 0 "6333" , size(*0.8))               ///
>>>   text(-1.2 0 "6306" , size(*0.8))                ///
>>>   text(-0.93 12 "6172" , size(*0.8))              ///
>>>   text(-1.2 12 "6120" , size(*0.8))               ///
>>>   text(-0.93 24 "5499" , size(*0.8))              ///
>>>   text(-1.2 24 "5452" , size(*0.8))               ///
>>>   text(-0.93 36 "4971" , size(*0.8))              ///
>>>   text(-1.2 36 "4905" , size(*0.8))               ///
>>>   text(-0.93 48 "4305" , size(*0.8))              ///
>>>   text(-1.2 48 "4286" , size(*0.8))               ///
>>>   text(-0.93 60 "3644" , size(*0.8))              ///
>>>   text(-1.2 60 "3657" , size(*0.8))
>>> -----------------------------------------------------
>>>
>
> *
> *   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/



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