'Select specific predictors in the cox regression

Is there a way to select show only the the first predictors in the adjusted cox regression ?

Here is the code I have:

cox <- coxph(Surv(time, event) ~ Group + age + sex + smoking, data = df)

But I have got this output:

                  coef  exp(coef)   se(coef)      z     p
Group2      -8.366e+01  4.633e-37  1.837e+03 -0.046 0.964
Group3      -5.505e+01  1.234e-24  2.554e+04 -0.002 0.998
Group4      -1.270e+02  7.050e-56  1.264e+04 -0.010 0.992
age          1.005e+00  2.733e+00  8.631e+01  0.012 0.991
sex         -1.441e+01  5.508e-07  2.998e+04  0.000 1.000
smoking     -5.172e+01  3.440e-23  2.063e+03 -0.025 0.980

Likelihood ratio test=28.32  on 9 df, p=0.0008421
n= 36, number of events= 4 

And I know all of these are predictors, but I would like to show only Group2, Group3, Group4 and remove age, sex, smoking as below:

                  coef  exp(coef)   se(coef)      z     p
Group2      -8.366e+01  4.633e-37  1.837e+03 -0.046 0.964
Group3      -5.505e+01  1.234e-24  2.554e+04 -0.002 0.998
Group4      -1.270e+02  7.050e-56  1.264e+04 -0.010 0.992

Likelihood ratio test=28.32  on 9 df, p=0.0008421
n= 36, number of events= 4 
r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source