MATLAB Answers

How do i set ud ordinal covariates with dummy variables in COX-PH regression?

6 views (last 30 days)
Felipe Lopez
Felipe Lopez on 21 Jul 2020 at 18:10
Hi everyone,
I'm running some survival analysis and I need to perform a COX multivareate regression, I'm using coxphfit however I'm not sure how to set categorical covariates as dummy variables into the multivariate model.
COX_MAT(:,1): Has the survival times
COX_MAT(:,4) Age as catergorical (0 <50, 1>=50)
COX_MAT(:,5): Treamtent 1, 2 or 3 (This is one I need set up as different dummy variables to analyze different levels)
COX_MAT(:,5): Different tumor types 1, 2, 3, 4, 5 (This is the other one I need set up as different dummy variables to analyze different levels)
coxphopt = statset('coxphfit');
coxphopt.Display = 'final';
coxphopt.MaxIter = 50;
[b,logl,H,stats] = coxphfit([COX_MAT(:,4),COX_MAT(:,5),COX_MAT(:,6)] ,...
COX_MAT(:,1),...
'Censoring',cell2mat(Patients_4_COX(:,3)),'baseline',0,'Options',coxphopt)
thank you very much!

  0 Comments

Sign in to comment.

Answers (0)

Tags


Translated by