testcov2 | R Documentation |
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)
x |
Numeric vector. The primary covariate whose association with the latent cure indicator is tested. |
time |
Numeric vector. Observed survival or censoring times. |
z |
Numeric vector. Secondary covariate for adjustment. |
delta |
Numeric vector. Censoring indicator (1 indicates event occurred, 0 indicates censored). |
P |
Integer. Number of permutations used to compute the permutation p-value. Default is 999. |
H |
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.
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
.
Park, T., Saho, X. & Yao, S. (2015). Partial martingale difference correlation. Electronic Journal of Statistics, 9, 1492–1517. \Sexpr[results=rd]{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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.