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   Maarten Buis <[email protected]>
To   [email protected]
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
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/


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