Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: stcompet cumulative incidence graphs with wrong time units


From   ROXANNE BEAUCLAIR <[email protected]>
To   [email protected]
Subject   st: stcompet cumulative incidence graphs with wrong time units
Date   Fri, 11 Apr 2014 11:31:20 +0200

Greetings statalisters,

I am trying to make a graph of cumulative incidence for my two
competing events using stcompet. My data has left truncation so I have
to specify the 'entry' date when I stset my data. This is an example
of the code:

stset spellend, failure(breakconcur==1) enter(time enterdate)
stcompet ci=ci, compet1(2)
twoway (line ci _t if breakconcur==1, sort lcolor(black)
lpattern(solid))(line ci _t if breakconcur==2, sort lcolor(black)
lpattern(dash))

Whenever I do this, the x-axis produces stata dates. However, I would
like it to be in days at risk.

When I stset my data by also specifying an origin, e.g.:

stset spellend, failure(breakconcur==1) origin(time enterdate)
enter(time enterdate)]

In this case, I get the days at risk on my x-axis, but the graph
produces this weird upwards steep tail for my competing risk. I'm not
sure why its doing this in this case, but not when there are dates on
the x-axis.

Can anyone tell me how I can fix this problem?

Warm Regards,
-- 
Roxanne Beauclair MA, MPH, PhD Candidate
International Centre for Reproductive Health (ICRH)
Ghent University, Belgium
www.icrh.org

The South African Department of Science and Technology / National
Research Foundation (DST/NRF)
Centre of Excellence in Epidemiological Modelling and Analysis (SACEMA)
Stellenbosch University, South Africa
www.sacema.com

Tel: +27 21 808 9236 (work)
Cell: +27 82 212 1621 (cell)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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