set_all_stremr_options: Setting 'stremr' Options

Description Usage Arguments Value See Also

View source: R/zzz.R


Options that control stremr package. Will reset all unspecified options (omitted arguments) to their default values. The preferred way to set options for stremr is to use stremrOptions, which allows specifying individual options without having to reset all other options. To reset all options to their defaults simply run set_all_stremr_options() without any parameters/arguments.


set_all_stremr_options(fit.package = c("speedglm", "glm", "h2o"),
  fit.algorithm = c("glm", "gbm", "randomForest", "deeplearning",
  "SuperLearner"), bin.method = c("equal.mass", "equal.len", "dhist"),
  nbins = 10, maxncats = 20, maxNperBin = 500,
  lower_bound_zero_Q = TRUE, skip_update_zero_Q = TRUE)



Specify the default package for performing model fitting: c("speedglm", "glm", "h2o")


Specify the default fitting algorithm: c("glm", "gbm", "randomForest", "deeplearning", "SuperLearner")


The method for choosing bins when discretizing and fitting the conditional continuous summary exposure variable sA. The default method is "equal.len", which partitions the range of sA into equal length nbins intervals. Method "equal.mass" results in a data-adaptive selection of the bins based on equal mass (equal number of observations), i.e., each bin is defined so that it contains an approximately the same number of observations across all bins. The maximum number of observations in each bin is controlled by parameter maxNperBin. Method "dhist" uses a mix of the above two approaches, see Denby and Mallows "Variations on the Histogram" (2009) for more detail.


Set the default number of bins when discretizing a continous outcome variable under setting bin.method = "equal.len". If left as NA the total number of equal intervals (bins) is determined by the nearest integer of nobs/maxNperBin, where nobs is the total number of observations in the input data.


Max number of unique categories a categorical variable sA[j] can have. If sA[j] has more it is automatically considered continuous.


Max number of observations per 1 bin for a continuous outcome (applies directly when bin.method="equal.mass" and indirectly when bin.method="equal.len", but nbins = NA).


Set to TRUE to bound the observation-specific Qs during the TMLE update step away from zero (with minimum value set at 10^-4). Can help numerically stabilize the TMLE intercept estimates in some small-sample cases. Has no effect when TMLE = FALSE.


Set to FALSE to perform TMLE update with glm even when all of the Q's are zero. When set to TRUE the TMLE update step is skipped if the predicted Q's are either all 0 or near 0, with TMLE intercept being set to 0.


Invisibly returns a list with old option settings.

See Also

stremrOptions, print_stremr_opts

stremr documentation built on May 30, 2017, 6:35 a.m.