# [R] Cox Regression : Spline Coefficient Interpretation?

Bert Gunter bgunter.4567 at gmail.com
Thu Nov 2 14:53:34 CET 2017

```Always reply to the list. I do not do private consulting.
(I have cc'ed this to the list).

I still think this belongs on stackexchange, not r-help. I think you need
to read up on the mathematics of spline bases.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Thu, Nov 2, 2017 at 3:43 AM, Kosta S. <kosmirnov at gmail.com> wrote:

> Hi Bert,
>
> Maybe I should make this more clear.
> I get following output when I use the pspline function inside the coxph
> statement:
>
> * library(survival)*
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *> Option.test2<-coxph(Surv(START,STOP,ZEROBAL==1)~pspline(OPTION),
>> data=FNMA)coxph(formula = Surv(START, STOP, ZEROBAL == 1) ~
>> pspline(OPTION),    data = FNMA)> > Option.test2> Call:> coxph(formula =
>> Surv(START, STOP, ZEROBAL == 1) ~ pspline(OPTION),>     data = FNMA)>
>>                        coef  se(coef)       se2     Chisq   DF
>>       p> pspline(OPTION), linear   -0.1334    0.0131    0.0131  104.4325
>> 1.00 <0.0000000000000002> pspline(OPTION), nonlin
>>     1747.1295 3.05 <0.0000000000000002> Iterations: 8 outer, 19
>> Newton-Raphson>      Theta= 0.991> Degrees of freedom for terms= 4>
>> Likelihood ratio test=2136  on 4.05 df, p=0  n= 3390429*
>
>
>
> What I do not understand, and what I have not found either in the package
> documentation nor somewhere else is how to  interpret the output result:
>
>
>
>
>
>
>
> *>                              coef  se(coef)       se2     Chisq   DF
>                 p> pspline(OPTION), linear   -0.1334    0.0131    0.0131
>  104.4325 1.00 <0.0000000000000002> pspline(OPTION), nonlin
>               1747.1295 3.05 <0.0000000000000002> Iterations: 8 outer, 19
> Newton-Raphson>      Theta= 0.991> Degrees of freedom for terms= 4>
> Likelihood ratio test=2136  on 4.05 df, p=0  n= 3390429*
>
>
> What does it actually tell me? What does the "linear" and "nonlinear"
> mean? It differs from the usual coxph output. Is this a proof of
> non-linearity?
>
> This topic was also alreday asked on the cross validated board, but
> unfortunately without any answer, see https://stats.
> stackexchange.com/questions/280168/interpretation-of-coxph-pspline-terms
>
>
> Thanks,
>
> KS
>
>
>
>
>
>
>
>
> 2017-11-01 23:11 GMT+01:00 Bert Gunter <bgunter.4567 at gmail.com>:
>
>> ??
>>
>> It is unclear to me what "How to interpret the result" means. Note that
>> the survival package is very well documented and there is a vignette
>> specifically on the topic of the use of "Spline terms in a Cox model." Have
>> you studied it?
>>
>> If you want to discuss the statistical issues, e.g. of survival modeling
>> or the technical details of penalized smoothing splines, that is mostly OT
>> here: stats.stackexchange.com would probably be a better place to post
>> for that. This list is mostly about R programming rather than statistics,
>> although they do sometimes intersect.
>>
>> If I have misunderstood your question, you might wish to clarify exactly
>> what it is that you are seeking in another post.
>>
>> Finally, as you can see from the below, post in PLAIN TEXT ONLY, as html
>> can get mangled by the server on this plain text mailing list.
>>
>> Cheers,
>> Bert
>>
>>
>>
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>> On Wed, Nov 1, 2017 at 1:12 PM, Kosta S. <kosmirnov at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm using a Cox-Regression to estimate hazard rates on prepayments.
>>>
>>> I'm using the "pspline" function to face non-linearity, but I have no
>>> clue
>>> how to interpret the result.
>>> Unfortunately I did not find enough information on the "pspline" function
>>> wether in the survival package nor using google..
>>>
>>> I got following output:
>>>
>>> * library(survival)*
>>>
>>>
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > *> Option.test2<-coxph(Surv(START,STOP,ZEROBAL==1)~pspline(OPTION),
>>> > data=FNMA)coxph(formula = Surv(START, STOP, ZEROBAL == 1) ~
>>> > pspline(OPTION),     data = FNMA)> > Option.test2> Call:>
>>> coxph(formula =
>>> > Surv(START, STOP, ZEROBAL == 1) ~ pspline(OPTION), >     data = FNMA)>
>>> >                          coef  se(coef)       se2     Chisq   DF
>>> >         p> pspline(OPTION), linear   -0.1334    0.0131    0.0131
>>> 104.4325
>>> > 1.00 <0.0000000000000002> pspline(OPTION), nonlin
>>> >     1747.1295 3.05 <0.0000000000000002> Iterations: 8 outer, 19
>>> > Newton-Raphson>      Theta= 0.991 > Degrees of freedom for terms= 4 >
>>> > Likelihood ratio test=2136  on 4.05 df, p=0  n= 3390429 >  *
>>>
>>>
>>> Thanks,
>>>
>>> KS
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help