On Fri, Jan 4, 2013 at 5:42 PM, Marc Peters wrote:
> I am new to event history models and am estimating a Cox proportional
> hazard model, with civil war as the dependent variable. <snip>
> This model runs well, but I encounter problems when including cubic
> splines, <snip>
The variables created by -mkspline- can be highly correlated, which
may be the cause of the problem you report. One way to solve that is
to use -orthog- on the variables created by -mkspline-. Something
like:
mkspline sp_year=year, cubic nknots(3)
orthog sp_year*, gen(o_year*)
stcox dem gdp o_year*, cluster (country)
Hope this helps,
Maarten
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* 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/