Simulate and analyze Semi-competing Risks Data using
    copula-based models. The Semi-competing Risks Data consist of a
    terminal event time and single or multiple intermediate event times.
    The marginal survival functions of these event times are estimated
    without parametric assumptions. The association parameters measuring dependency
    among these event times involving the copula model are yielded from
    solving a concordance estimating equations or maximizing a
    pseudo-likelihood function. Details can be found in the article by
    Tonghui Yu and Liming Xiang (2026) <doi:10.1093/biomtc/ujag087>.

Provides estimation procedures for copula-based stochastic frontier
  models for cross-sectional data. The package implements maximum likelihood
  estimation of stochastic frontier models allowing flexible dependence
  structures between inefficiency and noise terms through various copula
  families (e.g., Gaussian and Student-t). It enables estimation of technical
  efficiency scores, log-likelihood values, and information criteria (AIC and
  BIC). The implemented framework builds upon stochastic frontier analysis
  introduced by Aigner, Lovell and Schmidt (1977) <doi:10.1016/0304-4076(77)90052-5>
  and the copula theory described in Joe (2014, ISBN:9781466583221).
  Empirical applications of copula-based stochastic frontier models can be
  found in Wiboonpongse et al. (2015) <doi:10.1016/j.ijar.2015.06.001> and
  Maneejuk et al. (2017, ISBN:9783319562176).

To optimize clinical trial designs and data analysis methods consistently through trial simulation, we need to simulate multivariate mixed-type virtual patient data independent of designs and analysis methods under evaluation. To make the outcome of optimization more realistic, relevant empirical patient level data should be utilized when it’s available. However, a few problems arise in simulating trials based on small empirical data, where the underlying marginal distributions and their dependence structure cannot be understood or verified thoroughly due to the limited sample size. To resolve this issue, we use the copula invariance property, which can generate the joint distribution without making a strong parametric assumption. The function copula.sim can generate virtual patient data with optional data validation methods that are based on energy distance and ball divergence measurement. The function compare.copula.sim can conduct comparison of marginal mean and covariance of simulated data. To simulate patient-level data from a hypothetical treatment arm that would perform differently from the observed data, the function new.arm.copula.sim can be used to generate new multivariate data with the same dependence structure of the original data but with a shifted mean vector.