Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question: why is my stcurve graph missing a plot?

    I'm working on a survival model using data on treaty ratification, where subjects = signatures (when a country signs a treaty, or country_treaty_id) and failure = ratification (ratificationfailvar==1) of that treaty by that country. The model is then clustered by country (ccode), using a simple Cox regression.

    . stset years_since_signing, id(country_treaty_id) failure(ratification_failvar==1)

    . stcox i.time_period i.treaty_subject_num2 usa_participation reservationsallowed cinc distancetoUSA i.regime tax_ratio_lag, nohr vce(cluster ccode)

    . stcurve, survival at1(treaty_subject_num2=1) at2(treaty_subject_num2=2) at3(reaty_subject_num2=3) at4(treaty_subject_num2=4) at5(treaty_subject_num2=5)

    The regression proceeds normally, and all values of the variable treaty_subject_num2 (treaty subject, 5 categories) are significant (apart from the reference category reaty_subject_num2=1, which is not reported).

    However, when I try to plot the survival curve using stcurve to specify certain values of the variable treaty_subject_num2 it seems that only 4 lines appear on the resulting graph. The line for treaty_subject_num2=3 is missing, although it appears in the legend. I am certain that it is not being overlapped by any of the other lines. What am I doing wrong? Where did it go? Any advice would be much appreciated.





  • #2
    Welcome to Statalist, Laura!
    In the at() text for treaty_subject_num2=3, the initial "t" in "treaty" is missing.

    You can make such typos easier to catch if you set commands (and results) between CODE delimiters, described in FAQ 12. In general, posters are more likely to get helpful answers if they follow all the directives in FAQ 12.
    Last edited by Steve Samuels; 29 May 2018, 21:53.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment

    Working...
    X