Goodness-of-Fit Tests for Type-II Censored Samples via the
Malmquist Transformation
Goodness-of-fit tests for an arbitrary user-specified continuous
distribution under Type-II right- or left-censoring. Implements the
transformation-based method of Lin, Huang and Balakrishnan (2008)
, which uses a property of order statistics
due to Malmquist (1950) to convert an r-out-of-n Type-II censored uniform
sample into a complete sample of size r, alongside the earlier
transformation of Michael and Schucany (1979)
. Also implements the direct
(untransformed) censored-sample statistics of Barr and Davidson (1973)
and Pettitt and Stephens (1976)
, and the modified-statistic
maximum-likelihood procedure of Chen and Balakrishnan (1995) for testing
composite hypotheses. General background on empirical-distribution-function
goodness-of-fit methods follows D'Agostino and Stephens (1986,
ISBN:982-0-8247-7487-5).
gofmalm: Goodness-of-Fit Tests for Type-II Censored Samples via Malmquist Transformation
gofmalm provides goodness-of-fit (GOF) tests for arbitrary user-specified continuous parametric distributions under Type-II right- or left-censoring.
Features
- Implements the transformation-based goodness-of-fit testing method of Lin, Huang, and Balakrishnan (2008) using the Malmquist (1950) transformation.
- Implements the earlier transformation of Michael and Schucany (1979).
- Computes all 9 empirical distribution function (EDF) test statistics ($D_{r,n}, G_{r,n}, T_{r,n}, ^*W^2_{r,n}, W^2_{r,n}, A^2_{r,n}, U^2_{r,n}, ^TA^2_r, ^{*T}A^2_r$).
- Computes direct untransformed censored EDF statistics of Barr & Davidson (1973) and Pettitt & Stephens (1976) (${2}W^2{r,n}, {2}A^2{r,n}$).
- Supports simple hypotheses (known parameters, distribution-free simulation) and composite hypotheses (unknown parameters estimated via MLE, parametric bootstrap).
- Full support for Type-II left-censoring via quantile reflection.
Installation
You can install gofmalm from the source package tarball:
install.packages("gofmalm_0.1.0.tar.gz", repos = NULL, type = "source")
Quick Example
library(gofmalm)
# Example 1: Testing Uniform(0,1) with r = 5, n = 10 (simple hypothesis)
data_unif <- c(0.03, 0.06, 0.10, 0.11, 0.13)
res1 <- gof_censored(
data = data_unif,
n = 10,
pdf = dunif,
cdf = punif,
sf = function(x, p) 1 - punif(x),
estimate = FALSE,
pvalue_method = "distribution_free",
nsim = 1000,
seed = 123
)
print(res1)
References
- Lin, C.-T., Huang, Y.-L., & Balakrishnan, N. (2008). A New Method for Goodness-of-Fit Testing Based on Type-II Right Censored Samples. IEEE Transactions on Reliability, 57(4), 633–642. doi:10.1109/TR.2008.2005860
- Michael, J. R., & Schucany, W. R. (1979). A New Approach to Testing Goodness of Fit for Censored Samples. Technometrics, 21(4), 435–441. doi:10.1080/00401706.1979.10489813
- Pettitt, A. N., & Stephens, M. A. (1976). Modified Cramér-von Mises statistics for censored data. Biometrika, 63(2), 291–298. doi:10.1093/biomet/63.2.291