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]

Re: st: Cubic splines in stcox


From   Marc Peters <[email protected]>
To   [email protected]
Subject   Re: st: Cubic splines in stcox
Date   Fri, 4 Jan 2013 12:43:47 -0600

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 <[email protected]> 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/
*
*   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