Why are the results from the COXPHFIT function in the Statistics Toolbox (ver 5.1 ) Matlab 7.1 (R14SP3) different from the results in SAS (PHREG process) or R(coxph function)?

2 views (last 30 days)
For the same set of data, when I calculate the "Baseline cumulative hazard" using SAS (PHREG process) and program language R (coxph function call) both give me the same results. But with MATLAB, the estimated baseline cumulative hazard gives me different results.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This enhancement has been incorporated in Release 2006b (R2006b). For previous product releases, read below for any possible workarounds:
The issue here is “baseline relative to what?” MATLAB subtracts the mean of each predictor before doing the estimation. This does not affect the coefficient estimates, improves the stability of the estimation, and makes the baseline represent the hazard for an average individual.
SAS and R compute the baseline relative to an individual with all predictors equal to zero. Although some may consider this the standard, the MATLAB calculation does reproduce the plot on p.364 of the “Statistical Models and Methods for Lifetime Data” book by Lawless, which uses mean-centered predictors.
Here are two ways to reproduce the SAS results.
1. Adjust the baseline hazard after calling coxphfit:
[B,LOGL,H,STATS]= coxphfit(covariate, f_time,'censoring', status);
H(:,2) = H(:,2) .* exp(-mean(covariate)*B)
2. Edit the function "coxphfit" and remove the line below by placing a comment symbol in front of it:
X = X - repmat(freq'*X,n,1) / sumf;

More Answers (0)

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!