With this question, I solve by rpart () and rpart.plot(). What is your solution?
10.2 The human leukocyte antigen system (HLA) is a group of genes on chromosome 6 that are linked to the immune system. The data set hla in the gap library contains HLA data on six markers for 177 schizophrenia patients and 94 matched healthy controls.
Here is my code:
hla_rpart <- rpart(id ~ DQR.a1 + DQR.a2 + DQA.a1 + DQA.a2 + DQB.a1 + DQB.a2, hla) rpart.plot(hla_rpart, type = 2, extra = 2)
Thank you for supporting me, I would love to learn more knowledge from what you share!