Performs a permutation-based test assessing the association between a primary covariate (x) and the cure indicator, while adjusting for a secondary covariate (z).
The test calculates the p-value via permutation using the partial martingale difference correlation.
testcov2(x, time, z, delta, P = 999, H = NULL)List with components:
Numeric. The test statistic value.
Numeric. The permutation p-value assessing the null hypothesis of no association between x and the latent cure indicator, adjusting for z.
Numeric vector. The primary covariate whose association with the latent cure indicator is tested.
Numeric vector. Observed survival or censoring times.
Numeric vector. Secondary covariate for adjustment.
Numeric vector. Censoring indicator (1 indicates event occurred, 0 indicates censored).
Integer. Number of permutations used to compute the permutation p-value. Default is 999.
Optional numeric. Bandwidth parameter (currently unused, reserved for future extensions).
In order to test if the cure rate depends on the covariate \(\boldsymbol{X}\) given it depends on the covariate \(\boldsymbol{Z}\). The hypotheses are $$ \mathcal{H}_0 : \mathbb{E}(\nu | \boldsymbol{X}) \equiv 1 - p(\boldsymbol{X}) \quad \text{a.s.} \quad \text{vs} \quad \mathcal{H}_1 : \mathbb{E}(\nu | \boldsymbol{X}) \not\equiv 1 - p(\boldsymbol{X}) \quad \text{a.s.} $$ The proxy of the cure rate under the null hypothesis \(\mathcal{H}_0\) is obtained by: $$ \mathbb{I}(T > \tau) + (1-\delta)\mathbb{I}(T \leq \tau) \, \frac{1 - p(\boldsymbol{Z})}{1 - p(\boldsymbol{Z}) + p(\boldsymbol{Z})S_0(T|\boldsymbol{X,Z})}. $$
The statistic for testing the covariate hypothesis is based on partial martingale difference correlation and it is given by:
$$ \text{pMDC}_n(\hat{\nu}_{\boldsymbol{H}}|\boldsymbol{X,Z})^2. $$
The null distribution is approximated using a permutation test.
Park, T., Saho, X. & Yao, S. (2015). Partial martingale difference correlation. Electronic Journal of Statistics, 9, 1492–1517. tools:::Rd_expr_doi("10.1214/15-EJS1047")
pmdc for the partial martingale difference correlation, pmdd for the partial martingale difference divergence,
testcov for the test for one covariate.