The DepDoubleTruncKS package provides methods for
performing the two-dimensional Kolmogorov-Smirnov-type goodness-of-fit
test for exponentially distributed durations subject to double
truncation (left and right truncation), accounting for stochastic
dependence between duration and truncation age via copulas.
This methodology was developed by Toparkus & Weißbach (2026) in Lifetime Data Analysis.
Given double-truncated observations \((X_j^{\text{obs}}, T_j^{\text{obs}})_{j=1}^{m_n}\) falling inside the truncation parallelogram: \[D = \{ (x, t)^T \mid 0 < t \le x \le t + s, t \le G \}\]
set.seed(2026)
# Load sample dataset
data("enterprise_data")
# Perform KS test under FGM copula dependent truncation
res <- ks_dep_trunc(
x = enterprise_data$x[1:100],
t = enterprise_data$t[1:100],
s = 3,
G = 24,
model = "fgm",
grid_dim = 15,
n_sim = 100
)
# Print results summary
print(res)
#>
#> =========================================================
#> 2D Kolmogorov-Smirnov Test for Double-Truncated Data
#> =========================================================
#>
#> Model Family: Exponential Lifespan (Exp(theta))
#> Truncation Dependence: FGM Copula
#> Study Duration (s): 3
#> Max Age Bound (G): 24
#> Observed Sample (m_n): 100
#> Est. Latent Sample (n): 1028.7
#>
#> --- Parameter Estimates ---
#> Rate (theta_hat): 0.09039
#> Dependence (vtheta_hat): -0.15656
#> Obs. Prob. (alpha_hat): 0.09721
#>
#> --- Goodness-of-Fit Test Results ---
#> KS Test Statistic (D_mn): 1.15837
#> P-value: 0
#>
#> Critical Values (Algorithm 2):
#> 10% (alpha = 0.10): 0.80327
#> 5% (alpha = 0.05): 0.85279
#> 1% (alpha = 0.01): 0.99565
#>
#> Decision (alpha = 0.05): Reject H0: Parametric model assumption rejected.
#> =========================================================
# Plot observations and truncation boundaries
plot(res)Toparkus, A.-M. and Weißbach, R. (2026). Kolmogorov-Smirnov-type test for dependently double-truncated durations: A copula approach. Lifetime Data Analysis, 32, 41. doi:10.1007/s10985-026-09722-0.