title: How can I build a decision-tree classification model with multiple categorical variables?
body: <p>I am a complete noob, so this is a fairly basic question. I'm looking to build a decision tree-based classification model in SAS.</p>
  <p>I'm unable to embed pictures in my question nor am I able to attach images, but I have a dataset that I am working with.</p>
  <p>Here is a link preview of my data set:
  <a href="https://i.stack.imgur.com/HII89.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HII89.png" alt="enter image description here" /></a>
  I'm trying to build this decision-tree using the <em>hpsplit</em> procedure in SAS, but it's not working. I think it's because:</p>
  <p>(1) I am not using all of the categorical variables</p>
  <p>(2) I have missing values in the &quot;node-caps&quot; column: the available options are <strong>yes</strong>, <strong>no</strong>, and <strong>?</strong> - I think I should be using the &quot;ASSIGNMISSING&quot; procedure, but not sure. See image: <a href="https://i.stack.imgur.com/tJtQK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tJtQK.png" alt="enter image description here" /></a></p>
  <p>Here is my current code:</p>
  <pre><code>proc hpsplit data=bcancer seed=1;
  class class;
  model class = Age Menopause tumor_size inv_nodes node_caps deg_malig breast breast_quad irradiat;
  grow entropy;
  prune costcomplexity;
  run;
  </code></pre>
  <p>I think that I should be:</p>
  <p>(1) Adding more variables to the second row (as they are categorical)</p>
  <p>(2) Adding the &quot;ASSIGNMISSING&quot; procedure to account for missing variables in one column. See link: <a href="https://i.imgur.com/aJmB3kx.png" rel="nofollow noreferrer">https://i.imgur.com/aJmB3kx.png</a></p>
  <pre><code>NOTE: The ASSIGNMISSING= option has not been specified.  Because of this, all observations with
        missing values in the explanatory variables will be excluded from tree construction.
  ERROR: Character variable appeared on the MODEL statement without appearing on a CLASS statement.
  ERROR: Unable to create a usable predictor variable set.
  NOTE: The SAS System stopped processing this step because of errors.
  NOTE: PROCEDURE HPSPLIT used (Total process time):
        real time           0.01 seconds
        cpu time            0.01 seconds
  </code></pre>
  <p>For reference, this is the error I see in the log. Any help would be greatly appreciated!</p>