Create VMP formula node for a categorical variable
categories is the total number of categories. states is the length of the chain.