The function Conf_bands
implements the pointwise and uniform confidence bands for the estimator of the future conditional hazard rate \(\hat h_x(t)\). The confidence bands are based on a wild bootstrap approach \({h^*}_{{x_*},B}(t)\).
Pointwise:
For a given \(t\in (0,T)\) generate \({h^*}_{{x_*},B}^{(1)}(t),...,{h^*}_{{x_*},B}^{(N)}(t)\) for \(N = 1000\) and order it \({h^*}_{{x_*},B}^{[1]}(t)\leq ...\leq {h^*}_{{x_*},B}^{[N]}(t)\). Then
$$
\hat{I}^1_{n,N} = \Bigg[\hat{h}_{x_*}(t) - \hat{\sigma}_{{G}_{x_*}}(t)\frac{{h^*}_{{x_*},B}^{[ N(1-\frac{\alpha}{2})]}(t)}{\sqrt{n}}, \hat{h}_{x_*}(t) - \hat{\sigma}_{ {G}_x}(t)\frac{{h^*}_{{x_*},B}^{[ N\frac{\alpha}{2}]}(t)}{\sqrt{n}}\Bigg]
$$
is a \(1-\alpha\) pointwise confidence band for \(h_{x_*}(t)\), where \(\hat{\sigma}_{{G}_{x_*}}(t)\) is a bootrap estimate of the variance. For more details on the wild bootstrap approach, please see prep_boot
and g_xt
.
Uniform:
Generate \(\bar{h}_{{x_*},B}^{(1)}(t),...,\bar{h}_{{x_*},B}^{(N)}(t)\) for \(N = 1000\) for all \(t\in [\delta_T,T-\delta_T]\) and define \(W^{(i)} = \sup_{t\in[0,T]}\big|\bar{h}_{{x_*},B}^{(i)}(t)|\) for \(i = 1,...,N\). Order \(W^{[1]} \leq ... \leq W^{[N]}\). Then
$$\hat{I}^2_{n,N} = \Bigg[\hat{h}_{x_*}(t) \pm \hat{\sigma}_{{G}_{x_*}}(t) \frac{W^{[ N(1 - \alpha)]}}{\sqrt{n}} \Bigg]$$
is a \(1-\alpha\) uniform confidence band for \(h_{x_*}(t)\).