I'm using the party package in R to build a decision tree that has gender as one of my variables (1 for male, 2 for female, 99 for unknown) and my tree output only shows one node (basically not splitting into female or male). Below is the code that I'm using. I want to be able to see if my target variable (income) varies by gender.
library(party)
tree <- ctree(Mean_Incomef~Gender, data = mdftrain,controls = ctree_control(mincriterion=0.95,minsplit=20))
tree
plot(tree)