Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Cubic splines in stcox

From   Maarten Buis <>
Subject   Re: st: Cubic splines in stcox
Date   Fri, 4 Jan 2013 19:02:17 +0100

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

mkspline sp_year=year, cubic nknots(3)
orthog sp_year*, gen(o_year*)
 stcox dem gdp o_year*, cluster (country)

Hope this helps,

Maarten L. Buis
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index