when i run coxph(Surv(Time, Status)~Class, data = df)
on data set like below it always sets the reference group by alphabetical order, in this case MutantA would be the reference group. Is there a way to tell it to make WT the reference group ?
df
Time Status Class
3 1 WT
4 1 WT
5 1 WT
7 1 WT
7 1 WT
7 1 WT
7 1 WT
2 1 WT
2 1 WT
2 1 WT
5 1 WT
6 1 WT
7 1 WT
8 1 MutantA
9 1 MutantA
2 1 MutantA
12 1 MutantA
3 1 MutantA
4 1 MutantA
5 1 MutantA
7 1 MutantA
7 1 MutantA
7 1 MutantA
7 0 MutantA
2 1 MutantA
2 1 MutantA
2 1 MutantA
5 1 MutantB
6 0 MutantB
7 1 MutantB
8 1 MutantB
9 1 MutantB
2 1 MutantB
12 1 MutantB
3 1 MutantB
4 0 MutantB
5 1 MutantB
7 1 MutantB
7 0 MutantB
7 1 MutantB
7 0 MutantB
2 1 MutantB
2 1 MutantB
2 1 MutantB
5 1 MutantB
6 1 MutantC
7 1 MutantC
8 1 MutantC
9 1 MutantC
2 1 MutantC
12 1 MutantC
11 1 MutantC
4 1 MutantC
3 1 MutantC
6 1 MutantC
7 1 MutantC
11 1 MutantC
3 1 MutantC
2 1 MutantC
6 1 MutantC