search for: lysum

Displaying 1 result from an estimated 1 matches for "lysum".

Did you mean: mysum
2005 Aug 26
1
Help in Compliling user -defined functions in Rpart
...t;-sort(unique(x)) wtsum<-tapply(wt,x,sum) ysum<-tapply(wt*y,x,sum) means<-ysum/wtsum ord<-order(means) n<-length(ord) lss<-cumsum(ysum[ord])[-n] rss<-sum(ysum)-lss lw<-cumsum(wtsum[ord])[-n] rw<-sum(wtsum)-lw lm<-lss/lw rm<-rss/rw lysum<-tapply(wt*(y-lm)*(r-0.5),x,sum) lcss<-cumsum(lysum[ord])[-n] rcss<-sum(lysum)-lcss lci<-2*lcss/lss rci<-2*rcss/rss devlci<-abs(lci)*(1-abs(lci)) devrci<-abs(rci)*(1-abs(rci)) goodness<-devci-0.5*(lw/sum(wt))*devlci-0.5*(rw/sum(wt))*devrci list(goodness=go...