You might like to try parameterizing your cubic spline in a more
sensible way, using a reference spline method. That way, the parameters
may be hazard ratios between a reference year and a baseline year. This
can be done using the -flexcurv- module of the -bspline- package, which
you can download from SSC. The methods are given in detail in Newson
(2012), and presented in a conference presentation in Newson (2011).
I hope this helps.
Best wishes
Roger
References
Newson RB. Sensible parameters for univariate and multivariate splines.
The Stata Journal 2012; 12(3): 479-504. Download pre-publication draft from
Dear Maarten,
Thank you do much for your kind advice, I really appreciate it.
Unfortunately, the problem remains. It does not seem to be due to the
correlation between the two spline variables. I get the same error
message when running the model with only sp_year1.
I would me most grateful if you (or anyone else) has other ideas about
what the problem might be.
Thanks,
Marc
On Fri, Jan 4, 2013 at 10:42 AM, Marc Peters <marcpeters32c@gmail.com> wrote:
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/