[R] rcart - classification and regression trees (CART)

2009-12-16 Thread Katie N
Hi, I am trying to use CART to find an ideal cut-off value for a simple diagnostic test (ie when the test score is above x, diagnose the condition). When I put in the model fit=rpart(outcome ~ predictor1(TB144), method=class, data=data8) sometimes it gives me a tree with multiple nodes for

Re: [R] rpart - classification and regression trees (CART)

2009-12-14 Thread Katie N
Actually, that's the first thing I thought too, but they weren't listed in that order in my model statement (model that I used is below): fit=rpart(pres ~ TB144 + TB118 + TB129 + TB139 + TB114 + TB131 + TB122, method=class, data=data8) Would the selection of the best split when improvement is

[R] rpart - classification and regression trees (CART)

2009-12-12 Thread Katie N
Hi, I had a question regarding the rpart command in R. I used seven continuous predictor variables in the model and the variable called TB122 was chosen for the first split. But in looking at the output, there are 4 variables that improve the predicted membership equally (TB122, TB139, TB144,

[R] histbackback function

2009-12-07 Thread Katie N
Hi, I'm trying to recreate a sensitivity-specificity graph using the histbackback function. The only problem is that these graphs are typically drawn with vertical rather than horizontal bar plots (and the histbackback function only seems to work with horiz=TRUE argument, using horiz=FALSE