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)] ,...
thank you very much!