controlpars: Control Values for the Bootstrap or Cross-validation

Description Usage Arguments Details Value Author(s) See Also

View source: R/hselect.R

Description

This function returns a list of values for the control parameters of the functions of the package that use the bootstrap or cross-validation.

Usage

1
2
controlpars(B = 999L, hbound = c(0.1, 3), hl = 100L, hsave =
FALSE, nnfrac = 0.25, fpilot = NULL, qt = 0.75, hsmooth = 1L, ...)

Arguments

B

An integer giving the number of bootstrap resamples.

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 100.

hsave

A logical value specifying if the grids of bandwidths must be saved as a component of the list returned by the berancv, latencyboot and probcurehboot functions. 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 latency estimator (see latencyhboot), a numeric value specifiying 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 left boundary is 0). The default is 0.75 (third quartile).

hsmooth

An integer. Its value controls whether the bandwidths selected by the latencyhboot and probcurehboot and berancv function should be smoothed, and, if so, the degree of smoothing. The smoothing consists in computing a centered moving average of the unsmoothed vector of bandwidths returned by default by latencyhboot and probcurehboot. The value of hsmooth is the number of terms used to compute the average. The default is 1L, which means that no smoothing is done.

...

Arguments of fpilot, if fpilot is not NULL.

Details

The output of controlpars is a list of control parameters required by the package functions which use the bootstrap or cross-validation. This is mainly the case of the berancv function, which computes a cross-validation bandwidth for Beran's estimator of survival, and of the latencyhboot and probcurehboot functions, which compute the bootstrap bandwidth selectors of the estimators of the latency and the probability of cure, respectively. Since these functions are indirectly called by, respectively, the beran, latency and probcure functions 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.

Additionally, controlpars is used by beran, latency and probcure to set the number of bootstrap resamples and the value of nnfrac (see above) when confidence intervals are computed. The testcov function also uses it for setting the number of bootstrap resamples.

Value

A list whose components are the arguments of the function, their defaults being replaced with the values the function was called with.

Author(s)

Ignacio López-de-Ullibarri [aut, cre], Ana López-Cheda [aut], Maria Amalia Jácome [aut]

See Also

beran,berancv, hpilot, latency, latencyhboot, probcure, probcurehboot,testcov


npcure documentation built on March 26, 2020, 7:51 p.m.