add_dummy {maxEff} | R Documentation |
Additional Predictor as logical
Description
Additional predictor as logical.
Usage
add_dummy_partition(
start.model,
x,
data = eval(start.model$call$data),
times,
mc.cores = switch(.Platform$OS.type, windows = 1L, detectCores()),
...
)
add_dummy(
start.model,
x,
data = eval(start.model$call$data),
mc.cores = switch(.Platform$OS.type, windows = 1L, detectCores()),
...
)
Arguments
start.model |
|
x |
one-sided formula,
numeric predictors |
data |
(optional) data.frame in the model call of |
times , ... |
additional parameters of function |
mc.cores |
Details
Function add_dummy_partition()
partitions each additional numeric predictor
into a logical variable in the following steps.
-
Generate multiple, i.e., repeated, partitions via functions createDataPartition or
statusPartition()
. -
For each partition, create a dichotomizing rule (via function
node1()
) on the training set. Apply this dichotomizing rule on the test set and obtain the estimated regression coefficient (i.e., effect size) of the additional logical predictor. -
Among all partitions, select the one with median effect size of the additional logical predictor.
Function add_dummy()
partitions each additional
numeric predictor into a logical variable
using function node1()
,
then updates the starting model by adding in each of the dichotomized
logical predictor.
Value
Function add_dummy_partition()
returns an object of class 'add_dummy'
, which is a listof node1 objects.
Function add_dummy()
returns an object of class 'add_dummy'
,
which is a listof node1 objects.