필터 지우기
필터 지우기

How can I calculate the 95% confidence intervals of the hazard ratio from coxphfit?

조회 수: 19 (최근 30일)
Hi everybody.
I am using coxphfit to compute P-values and hazard ratios for data related to clinical trials and need to be able to compute a the 2-sided 95% confidence interval of the hazard ratio.
Any help will be appreciated
  댓글 수: 5
Alexander MacFarlane IV
Alexander MacFarlane IV 2018년 8월 21일
Wow, thanks!
I see now why you have MVP next to your name.
Star Strider
Star Strider 2018년 8월 21일
My pleasure!
It's an interesting problem, since MATLAB usually provides these, or an easy way to calculate them.

댓글을 달려면 로그인하십시오.

채택된 답변

Mau Coen Moraga
Mau Coen Moraga 2018년 8월 22일
편집: Mau Coen Moraga 2018년 8월 22일
Hi Alexander,
My name is Mau and I can confirm that there is no documentation provided to calculate the confidence intervals for the Cox Proportional Hazards Model. Upon further deliberation with my colleagues, we will consider adding the confidence interval functionality to “coxphfit” in a future release of MATLAB.
In the meantime, in order to calculate a confidence interval from the fitted Cox Proportional Hazards Model, you can follow the commands below:
% Generate Weibull data depending on predictor |X|.
rng('default') % for reproducibility
X = 4*rand(100,1);
A = 50*exp(-0.5*X);
B = 2;
y = wblrnd(A,B);
% Fit a Cox proportional hazards model.
[b,logL,H,stats] = coxphfit(X,y);
% Hazard Ratio exp(b)
exp(b)
ans =
2.5623
% Calculate 95% confidence interval of Hazard Ratio
CI = exp(b + [-1 1]*1.96*stats.se)
CI =
2.0030 3.2778
Feel free to respond here for further questions.
Sincerely,
Mau Coen
  댓글 수: 2
Alexander MacFarlane IV
Alexander MacFarlane IV 2018년 8월 22일
Thank you Mau Coen, and thanks again to Star Strider.
I tried that with some of my data and confirmed the results with our in-house statisticians and it works perfectly.
Victor Fernandes
Victor Fernandes 2023년 4월 5일
so we're assuming a normal distribution here?? Does that make sense?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by