b.OSCV.MBC: DO-Validation for Multiplicative Bias Corrected Hazard...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Bandwidth selection for the multiplicatively bias corrected local linear hazard estimation using DO-validation and one-sided (left or right) cross-validation

Usage

1
b.OSCV.MBC(grid.b, nb , K = "sextic", Ktype = "left", xi, Oi, Ei, wei = "same")

Arguments

grid.b

Optional. A vector of bandwidths to minimise the cross-validation score. If not specified it will be considered an equally-spaced grid of nb bandwidths between "amp/(M+1)" and "amp/2" for "amp" being the range of xi and "M" its length.

nb

Optional. The number of bandwidths used to minimise the cross-validation score. If grid.b is provided then the argument nb will be ignored (if specified).

K

Indicates the kernel function to be considered in the hazard estimator. Choose between values "epa" (for the Epanechnikov kernel) or "sextic" (see details of hazard.MBC for the definition).

Ktype

Choose between "left" or "right" for left- or right- sided cross-validation, respectively.

xi

Vector of time points where the count data are given.

Oi

Vector with the number (counts) of occurrences observed at each time point (xi).

Ei

Vector with the observed exposure at each time point (xi).

wei

Indicates the weights used in the cross-validation score. Choose between the value "exposure" or "same". See details below.

Details

It is assumed that the data are given as count data i.e. number of occurrences and exposures.

The DO-validated bandwidth is calculated as the average of left- and right- sided cross-validation (see example below).

If the one-sided cross-validation score is strictly increasing or decreasing then a warning will be shown together with the onesided cross-validated bandwidth (in this case one of the extremes in grid.b, adjusted by the rescaling constant, which is 0.5948 for Epanechnikov kernel, and 0.6501 for the sextic kernel).

The score is defined with two different weighting functions. This is controlled with the parameter wei. By default wei="exposure" that means that only areas where the exposure is significant contribute to the criterion. Specify wei="same" to allow all time points contribute the same to the criterion (see Gamiz et al. 2017).

Value

boscv

The one-sided cross-validated bandwidth.

ind.oscv

The position of the one-sided cross-validated bandwidth into grid.b.

oscv.values

The values of the one-sided cross-validation score for each bandwidth in grid.b.

b.grid

The grid of bandwidths where the one-sided cross-validation score has been evaluated.

Author(s)

Gamiz, M.L., Martinez-Miranda, M.D. and Nielsen, J.P.

References

Gamiz, M.L., Martinez-Miranda, M.D. and Nielsen, J.P. (2017). Multiplicative local linear hazard estimation and best one-sided cross-validation. Available at http://arxiv.org/abs/1710.05575

Nielsen, J.P. and Tanggaard, C. (2001). Boundary and bias correction in kernel hazard estimation. Scandinavian Journal of Statistics,28, 675-698.

See Also

hazard.MBC,b.CV.MBC,b.BO.MBC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(Iceland)
Oi<-Iceland$D
Ei<-Iceland$E
ti<-40:110  # time is age and it goes from 40 to 110 years
my.bs<-seq(50,80,length.out=30)
## The left one-sided cross-validated bandwidth
res.left<-b.OSCV.MBC(grid.b=my.bs,K="sextic",Ktype="left",
    xi=ti,Oi=Oi,Ei=Ei,wei="same")
bleft<-res.left$boscv
## The right one-sided cross-validated bandwidth
res.right<-b.OSCV.MBC(grid.b=my.bs,K="sextic",Ktype="right",
    xi=ti,Oi=Oi,Ei=Ei,wei="same") 
bright<-res.right$boscv
## The do-validated bandwidth
bdo<-(bleft+bright)/2
print(paste("DO-validated bandwidth= ", bdo, sep=""))

DOvalidation documentation built on May 2, 2019, 10:16 a.m.