search for: kyphosisweighted

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

2011 Dec 27
0
Using minsplit and unequal weights in rpart
...t is the original data repeated 3 times kyphosisRepeated <- rbind(kyphosis, kyphosis, kyphosis) fitRepeated <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosisRepeated, control=rpart.control(minsplit=45)) plot(fitRepeated) text(fitRepeated, use.n=TRUE) # instead of repeating, use weights kyphosisWeighted <- kyphosis kyphosisWeighted$myWeights <- 3 fitWeighted <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosisWeighted, weights=myWeights, control=rpart.control(minsplit=15)) ## minsplit has to be adjusted for weights... plot(fitWeighted) text(fitWeighted, use.n=TRUE) # uneven...