controlpars {npcurePK}R Documentation

Control Values for the Bootstrap

Description

This function returns a list of values for the control parameters of the functions that will be used for the bootstrap bandwidth selector.

Usage

    controlpars(b = 100L, hbound = c(0.1, 3), hl = 30L, hgrid_save = FALSE,
                nnfrac = 0.25, fpilot = NULL, qt = 0.9, ncores = 1L,
                seed = NULL, ...)

Arguments

b

An integer giving the number of bootstrap resamples, 100 by default.

hbound

A numeric vector of length 2 specifying the minimum (default, 0.1) and maximum (default, 3), respectively, of the initial grid of bandwidths as a multiple of the standardized interquartile range of the covariate values.

hl

A numeric value giving the length of the initial grid of bandwidths. The default is 10.

hgrid_save

A logical value specifying if the grids of bandwidths must be saved as a component of the list returned by the prodlim_curepk_boot function. The default is FALSE.

nnfrac

A numeric value giving the fraction of the sample size that determines the order of the nearest neighbor used when choosing the pilot bandwidth. The default is 0.25.

fpilot

A function name or NULL. If NULL, the default, the hpilot function is used for computing a pilot bandwidth in case that one is needed. If not NULL, it must be the name of a user-defined function, given as a function name or as a character string. This function must necessarily have an argument x0, playing the same role than in hpilot, and must return a value of the same length than x0. If fpilot has more arguments, they are passed through the ... argument (see below).

qt

In bandwidth selection for the product-limit estimator, a numeric value specifying the order of a quantile of the observed times. It determines the right boundary of the integration interval in the computation of the ISE (the lower limit is 0). The default is 0.9 (90th quantile).

ncores

The number of cores used in parallel computations.

seed

An optional integer passed to set.seed() to set the randomization seed.

...

Arguments of fpilot, if fpilot is not NULL.

Details

The output of controlpars is a list of control parameters required by the functions which use the bootstrap. This is mainly the case of the prodlimcurePKhboot function, which compute the bootstrap bandwidth selectors of the estimators of the survival, latency and the probability of cure. Since these functions are indirectly called by prodlimcurePKhboot function when their h argument is missing, the output of controlpars is also the expected (and default) way of passing to them the parameters for bandwidth selection.


[Package npcurePK version 1.0-2 Index]