To whom it may concern, I am using the rpart() function to perform a recursive tree analysis on a set of data that includes both numerical and categorical attributes. At the end of the analysis, I would like to see the linear model at each node in the tree. In particular, I would like to see each node specific model coefficients associated with each of the independent variables and intercepts. I've tried using the summary() method, but don't see this kind of information. How can I see this information? Thanks, Charlie ------------------------- Charles H. Rosa, Ph.D. Staff Research Engineer, Research & Development GM R&D Warren, MI Tel/work: +1 586 986-6032 Tel/cell: +1 781 367-5154
rpart (and tree) do not fit a linear model at each node, merely a threshold split. See Alexander, W. P., and Grimshaw, S. D. (1996), "Treed Regression," Journal of Computational and Graphical Statistics, 5, 156-175, for an alternative that may meet your needs.> I am using the rpart() function to perform a recursive tree analysison a> set of data that includes both numerical and categorical attributes. > At the end of the analysis, I would like to see the linear model ateach> node in the tree. In particular, I would like to see each nodespecific> model coefficients associated with each of the independent variablesand> intercepts. > > I've tried using the summary() method, but don't see this kind of > information. How can I see this information?
Rpart does not fit a linear model at any node. Please read up on tree-based models. On Fri, 28 Feb 2003 charles.rosa at gm.com wrote:> To whom it may concern, > I am using the rpart() function to perform a recursive tree analysis on a > set > of data that includes both numerical and categorical attributes. > At the end of the analysis, I would like to see the linear model at each > node in the tree. In particular, I would like to see each node specific > model coefficients > associated with each of the independent variables and intercepts. > > I've tried using the summary() method, but don't see this kind of > information. > How can I see this information? > > Thanks, Charlie > > ------------------------- > Charles H. Rosa, Ph.D. > Staff Research Engineer, Research & Development > GM R&D > Warren, MI > Tel/work: +1 586 986-6032 > Tel/cell: +1 781 367-5154 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.math.ethz.ch/mailman/listinfo/r-help >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, stats.ox.ac.uk/~ripley University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595