[R] R, ctree and categorical variables

seanstclair at verizon.net seanstclair at verizon.net
Fri Jul 29 05:11:15 CEST 2011

   I am running the ctree function in R.

   My data has about 10 variables, many of which are categorical.  2 of the
   categorical variables have many levels (one has 900 levels, another has
   1,000 levels).  As an example, 1 of these variables is disease code and is
   structured as A, B, C, ...., AA, AB, AC....

   Each time i've tried to run the ctree function, including these 2 variables
   in  the data, the function never stops running.  When i remove these 2
   variables from the data and run without them, the function returns in about
   3 seconds.

   Q:  Is there a limit to the amount of levels that a categorical variable can
   contain?  Is there something else that i may be overlooking?


More information about the R-help mailing list