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: Cubic splines in stcox


From   Marc Peters <[email protected]>
To   [email protected]
Subject   st: Cubic splines in stcox
Date   Fri, 4 Jan 2013 10:42:09 -0600

Dear Statalist users,


I am new to event history models and am estimating a Cox proportional
hazard model, with civil war as the dependent variable. the dependent
variable is measured at discrete intervals (yearly).

My basic model is estimated using the following syntax:

stset year, failure(cwar)

stcox dem gdp, cluster (country)

This model runs well, but I encounter problems when including cubic
splines, using this syntax:

mkspline sp_year=year, cubic nknots(3)

stcox dem gdp sp_year*, cluster (country)


When running the command I get the following message "flat region
resulting in a missing likelihood"


I am sure this is a very trivial question, but I would greatly
appreciate if anyone could help me in explaining what the problem is
and how I might fix it.

Thank you,


Marc
*
*   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