Test of Maller-Zhou
This function carries out the nonparametric test of Maller and Zhou (1992).
testmz(t, d, dataset)
t |
If |
d |
If |
dataset |
An optional data frame in which the variables named in
|
The function implements Maller and Zhou's (1992) method to test the null hypothesis H_0 : tau_F_0 > tau_G vs. H_1 : tau_F_0 <= tau_G, where tau_F_0 and tau_G are the supports of, respectively, the distribution function of the survival time of the uncured and the distribution function of the censoring time.
An object of S3 class 'npcure'. Formally, a list of components:
type |
The constant character string c("test", "Maller-Zhou"). |
pvalue |
The p-value of the test. |
aux |
A list of components: |
Ignacio López-de-Ullibarri [aut, cre], Ana López-Cheda [aut], Maria Amalia Jácome [aut]
Maller R. A., Zhou S. (1992). Estimating the proportion of immunes in a censored sample. Biometrika, 79: 731-739. https://doi.org/10.1093/biomet/79.4.731.
## Some artificial data set.seed(123) n <- 50 y <- qweibull(runif(n)*pweibull(2, shape = 2), shape = 2) ## True lifetimes c <- qexp(runif(n)*pexp(2.5)) ## Censoring values u <- runif(n) ## Probability of being susceptible is constantly equal to .5 t <- ifelse(u < .5, pmin(y, c), c) ## Observed times d <- ifelse(u < .5, ifelse(y < c, 1, 0), 0) ## Uncensoring indicator data <- data.frame(t = t, d = d) ## Maller-Zhou test testmz(t, d, data)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.