stable: Main function to calculate stability coefficients

Description Usage Arguments Examples

Description

Main function to calculate stability coefficients

Usage

1
2
3
4
5
stable(formula, data, methods = c("lm", "rpart", "tree", "ctree", "evtree"),
  samp.method = "repeatedcv", tuneLength = 3, n.rep = 100,
  bump.rep = 50, parallel = FALSE, ncore = detectCores() - 1,
  roundVal = 1, stablelearner = FALSE, subset = FALSE, perc.sub = 0.75,
  weights = NULL)

Arguments

formula

a formula, weight a response to left of ~.

data

Data frame to run models on

methods

Which tree methods to use. Defaults: lm, rpart, tree, ctree, evtree. Also can use "rf" for random forests

samp.method

Sampling method. Refer to caret package trainControl() documentation. Default is repeated cross-validation. Other options include "cv" and "boot".

tuneLength

Number of tuning parameters to try. Applies to train()

n.rep

Number of times to replicate each method

bump.rep

Number of repetitions for bumping

parallel

Whether to run all reps in parallel

ncore

Number of cores to use

roundVal

How much to round cut points when calculating stability

stablelearner

Whether or not to use the stablelearner package to calculate stability

subset

Whether to subset

perc.sub

What fraction of data to put into train dataset. 1-frac.sub is allocated to test dataset. Defaults to 0.75

weights

Optional weights for each case.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(MASS) # for boston data
data(Boston)
stab.out <- stable(formula=medv ~.,data=Boston,
            methods=c("rpart"),samp.method="cv",
            tuneLength=2, n.rep=5, parallel=TRUE)
stab.out

## End(Not run)

dtree documentation built on May 1, 2019, 9:19 p.m.

Related to stable in dtree...