Dear All, We came across a problem when using the "tree" package to analyze our data set.
First, in the "tree" function, if we use the default value "mindev=0.01", the resulting regression tree has a single node. So, we set "mindev=0", and obtain a tree with 931 terminal nodes. However, when we further use the "cv.tree" function to run a 10-fold cross-validation, the error message is: "Error in prune.tree(list(frame = list(var = 1L, n = 6676, dev = 3.28220789569792, : can not prune singlenode tree". Is the "cv.tree" function respecting the mindev chosen in the tree function or what else might be wrong? Thanks, Shiyao [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.