## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(DepDoubleTruncKS)

## ----example------------------------------------------------------------------
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)

# Plot observations and truncation boundaries
plot(res)

