Return number of nodes for an rpart model

Hi!
I made an rpart model without specifying the number of nodes or splits that should be used when building a model. Now that the model is built, can anybody help me on how to retain the nodes number information?

All I got from putting the model name to the console is this.


node), split, n, deviance, yval
      * denotes terminal node

   1) root 205 34004.1100 61.92516  
     2) RC2>=0.6233395 19  3302.7490 40.86135 *
     3) RC2< 0.6233395 186 21410.2300 64.07684  
       6) RC5< -0.710474 11   656.5536 47.96909 *
       7) RC5>=-0.710474 175 17720.2200 65.08933  
        14) RC5< 1.946633 166 15505.6700 64.29421  
          28) RC2>=-0.4604289 141 12851.2600 63.15553  
            56) RC3>=-0.05719171 29  3301.4600 58.00365  
             112) RC2>=-0.09551143 11   790.7054 48.26091 *
             113) RC2< -0.09551143 18   828.5451 63.95754 *
            57) RC3< -0.05719171 112  8580.7840 64.48950  
             114) RC2< -0.3443182 12   754.5384 57.82095 *
             115) RC2>=-0.3443182 100  7228.5750 65.28973  
               230) RC4>=1.708956 8   481.4318 56.68750 *
               231) RC4< 1.708956 92  6103.6790 66.03775  
                 462) RC3< -0.9172455 30  2336.1090 62.57238  
                   924) RC4>=-0.3473598 8   156.1515 56.38375 *
                   925) RC4< -0.3473598 22  1762.1490 64.82279 *
                 463) RC3>=-0.9172455 62  3232.9860 67.71454  
                   926) RC5< -0.4009263 23   312.8609 64.30224 *
                   927) RC5>=-0.4009263 39  2494.3800 69.72692  
                    1854) RC5>=-0.2879717 24  1274.9930 66.86786 *
                    1855) RC5< -0.2879717 15   709.3129 74.30143 *
          29) RC2< -0.4604289 25  1440.4960 70.71634  
            58) RC3< 1.047133 14   901.8309 67.25765 *
            59) RC3>=1.047133 11   158.0385 75.11831 *
        15) RC5>=1.946633 9   173.8869 79.75492 *

I would really appreciate your help. Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.