0
$\begingroup$

When performing the same cox-regression in SAS and i R (including and interaction with a 3 knot restricted cubic spline), I receive different parameter estimates (i.e on age_spline 2). In my example below I have used the dataset=WHAS500 found on this website (https://stats.idre.ucla.edu/sas/seminars/sas-survival/)

To harmonize the models (and the splines) between SAS and R I have used knots according to Harrell's scheme (https://blogs.sas.com/content/iml/2019/02/18/regression-restricted-cubic-splines-sas.html) and set both TIES to EFRON

SAS-code

proc phreg data = whas500;
effect age_spline = spline(age/ details naturalcubic basis=tpf(noint) 
knotmethod=percentilelist(10 50 90));
model lenfol*fstat(0) = gender|age_spline /rl ties=EFRON; 
run;

R-code

fit <- cph(Surv(LENFOL, FSTAT) ~ GENDER*rcs(AGE,3), data = whas500)

Output

enter image description here

I would be very thankful if someone can help me explain the observed differences.

$\endgroup$
2
  • 1
    $\begingroup$ Did you notice that although two of the coefficient estimates differ, they nevertheless have identical p-values in both programs? This implies there's simply a difference in how the terms are standardized. It's unlikely the R documentation explains this, so consider comparing the model matrices in both programs. $\endgroup$
    – whuber
    Commented Jul 31, 2020 at 16:11
  • 1
    $\begingroup$ Thank you for the suggestion! $\endgroup$
    – Thomas
    Commented Aug 10, 2020 at 13:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.