Learn R Programming

vcrpart (version 0.2-1)

tvcm-control: Control parameters for tvcm.

Description

Various parameters that control aspects for tvcm.

Usage

tvcm_control(lossfun = neglogLik2, 
             maxstep = Inf, maxwidth = Inf,
             minsize = 30, maxdepth = Inf,
             dfpar = 2.0, dfsplit = 0.0,
             maxoverstep = ifelse(sctest, Inf, 0),
             sctest = FALSE, alpha = 0.05, bonferroni = TRUE,
             trim = 0.1, estfun = list(),
             maxfacsplit = 5L, maxordsplit = 10, maxnumsplit = 10,
             cv = !sctest, folds = folds_control("kfold", 5),
             prune = cv, keeploss = FALSE, papply = mclapply,
             verbose = FALSE, ...)

Arguments

lossfun
a function that extracts a loss measure from a fitted object, e.g., two times the negative log likelihood (default).
maxstep
integer. The maximum number of iterations i.e. the total number of splits processed.
maxwidth
integer (vector). The maximum width of the tree(s).
minsize
numeric. The minimum sum of weights in a terminal node. The default is the number of varying coefficients times 10. The parameter specifies also the trimming in parameter coefficient tests for numeric variables (if sctest = TRUE).
maxdepth
integer (vector). The maximum depth of the tree(s).
dfpar
a numeric scalar larger than zero. The per-parameter penalty to be applied for stopping. See also argument maxoverstep.
dfsplit
a numeric scalar larger than zero. The per-split penalty to be applied for stopping. See also argument maxoverstep.
maxoverstep
integer scalar. The maximum number of consecutive times the penalized reduction statistic is allowed to be smaller than dfsplit before stopping. Specifically, the penalized loss is computed as the loss (see argument lossfun
sctest
logical scalar. Defines whether coefficient constancy tests should be used for variable and node selection.
alpha
numeric significance threshold between 0 and 1. A node is splitted when the smallest (possibly Bonferroni-corrected) $p$ value for any coefficient constancy test in the current step falls below alpha.
bonferroni
logical. Indicates if and how $p$-values of coefficient constancy tests must be Bonferroni corrected. See details.
trim
numeric between 0 and 1. Specifies the trimming parameter in coefficient constancy tests for continuous partitioning variables.
estfun
list of arguments to be passed to gefp.olmm.
maxfacsplit
integer.
maxordsplit
integer.
maxnumsplit
integer. The maximum number of evaluation for splits on numeric partitioning variables.
cv
logical scalar. Whether or not the dfsplit parameter should be cross-validated.
folds
a list of parameters to create folds as produced by folds_control.
prune
logical scalar. Whether or not the overly large partitions should be pruned by the estimated dfsplit parameter from cross-validation. Note that prune = TRUE conflicts with cv = FALSE
keeploss
logical scalar or a numeric equal or larger than 0. Indicates if and how many times the computed penalized loss reduction statistics should be reused in the following iterations. Specifically, the option activates approximating the penaliz
papply
(parallel) apply function, defaults to mclapply. The function will parallelize the partition stage and the evaluation of the cross-validation folds as well as the final pruning stage.
verbose
logical. Should information about the fitting process (such as test statistics, $p$ values, selected splitting variables and split points) be printed to the screen?
...
further, undocumented arguments to be passed. These can include arguments for the papply function.

Value

  • A list of class tvcm_control containing the control parameters for tvcm.

See Also

tvcm, fvcm

Examples

Run this code
tvcm_control()

Run the code above in your browser using DataLab