An embedded and charset-unspecified text was scrubbed... Name: no disponible URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111206/1e0eb77d/attachment.pl>
varaince explined of a regression tree using ctree
2 messages · Antonio Punzon, Patrick Breheny
On 12/06/2011 03:05 PM, Antonio Punzon Merino wrote:
I would like know the way to calculate the variance explained of a regression tree. I use the function "ctree" from library "party"
ctree does not provide this information by default, but it is not difficult to calculate: X <- matrix(rnorm(100*10),ncol=10) y <- X%*%c(rep(2,5),rep(0,5))+rnorm(100) fit <- ctree(y~.,data=as.data.frame(X)) r <- y - predict(fit) 1-var(r)/var(y)
Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky