Package: hce 0.9.4

Samvel B. Gasparyan

hce: Design and Analysis of Hierarchical Composite Endpoints

Simulate and analyze hierarchical composite endpoints with univariate distributions by Gasparyan, Koch, Brunner in (2025) in “The Univariate Distribution of Hierarchical Composite Endpoints and the Condorcet Non-transitivity Paradox.” (Biometrical Journal 68 (3), <doi:10.1002/bimj.70140>). Includes implementation for the kidney hierarchical composite endpoint as defined in Heerspink HL et al (2023) “Development and validation of a new hierarchical composite end point for clinical trials of kidney disease progression” (Journal of the American Society of Nephrology 34 (2): 2025–2038, <doi:10.1681/ASN.0000000000000243>). Win odds, also called Wilcoxon-Mann-Whitney or success odds, is the main analysis method, but other win statistics (win probability, win ratio, net benefit) are also implemented in the univariate case. The win probability analysis is based on the Brunner-Munzel test and uses the DeLong-DeLong-Clarke-Pearson variance estimator, as described by Brunner and Konietschke (2025) in “An unbiased rank-based estimator of the Mann–Whitney variance including the case of ties” (Statistical Papers 66 (1): 20, <doi:10.1007/s00362-024-01635-0>). Includes implementation of a new Wilson-type, compatible confidence interval for the win odds, as proposed by Schüürhuis, Konietschke, Brunner (2025) in “A new approach to the nonparametric Behrens–Fisher problem with compatible confidence intervals.” (Biometrical Journal 67 (6), <doi:10.1002/bimj.70096>). Stratification and covariate adjustment are performed based on the methodology presented by Koch GG et al. in “Issues for covariance analysis of dichotomous and ordered categorical data from randomized clinical trials and non-parametric strategies for addressing them” (Statistics in Medicine 17 (15-16): 1863–92). For a review, see Gasparyan SB et al (2021) “Adjusted win ratio with stratification: Calculation methods and interpretation” (Statistical Methods in Medical Research 30 (2): 580–611, <doi:10.1177/0962280220942558>).

Authors:Samvel B. Gasparyan [aut, cre]

hce_0.9.4.tar.gz
hce_0.9.4.zip(r-4.7)hce_0.9.4.zip(r-4.6)hce_0.9.4.zip(r-4.5)
hce_0.9.4.tgz(r-4.6-any)hce_0.9.4.tgz(r-4.5-any)
hce_0.9.4.tar.gz(r-4.7-any)hce_0.9.4.tar.gz(r-4.6-any)
hce_0.9.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
hce/json (API)

# Install 'hce' in R:
install.packages('hce', repos = c('https://samve.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/samve/hce/issues

Datasets:
  • ADET - Event-Time dataset for kidney outcomes.
  • ADLB - Laboratory dataset for Glomerular Filtration Rate (GFR) measurements.
  • ADSL - Baseline characteristics dataset of patients with kidney function assessments.
  • COVID19 - COVID-19 ordinal scale dataset (full report).
  • COVID19b - COVID-19 ordinal scale dataset (preliminary report).
  • COVID19plus - COVID-19 ordinal scale dataset for a combination therapy.
  • HCE1 - 'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.
  • HCE2 - 'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.
  • HCE3 - 'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.
  • HCE4 - 'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.
  • KHCE - Kidney Hierarchical Composite Endpoint dataset.

On CRAN:

Conda:

6.56 score 1 packages 36 scripts 647 downloads 26 exports 0 dependencies

Last updated from:8ea638734c. Checks:8 OK, 1 ERROR. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK144
source / vignettesERROR164
linux-release-x86_64OK119
macos-release-arm64OK127
macos-oldrel-arm64OK107
windows-develOK93
windows-releaseOK93
windows-oldrelOK92
wasm-releaseOK104

Exports:as_formulaeas_hcecalcWINScalcWOdeltaWOdGLLhcehGLLHGLLIWPminWOpGLLpowerWOpropWINSqGLLregWOrGLLrweibullGFsimHCEsimKHCEsimORDsimTTEsizeWOsizeWRstratWOsummaryWO

Dependencies:

Introduction
hce package intro | Background | Setup | Contents | In Brief | Calculations | Univariate hierarchical composite endpoints | Thresholds | Simulations | Power and sample size | Ordinal dominance graph and the maraca plot | Extras | Helpers | hce Objects | hce() Function | Create an hce Object from a Data Frame | Simulate hce Objects Using simHCE() | Generics for hce Objects | References

Last update: 2026-06-26
Started: 2022-10-16

Hierarchical composite endpoints
Introduction | Setup | Definitions | Examples | Kidney HCE | COVID-19 | Heart Failure | Simulations | The kidney HCE | Dependent Time-To-Event Outcomes | Joint Distribution Modeling Using Copulas | The Marshall-Olkin algorithm | Chambers-Mallows-Stuck method for simulating stable random variables | Note | Implementation | References

Last update: 2026-05-05
Started: 2023-08-03

Win statistics
Win Odds, Win Ratio, and Net Benefit | Setup | Terminology | Definitions | References

Last update: 2026-03-12
Started: 2023-01-07

Visualization of HCE using maraca plots
Visualization | Setup | The Maraca Plot | References

Last update: 2025-03-04
Started: 2023-10-31

Readme and manuals

Help Manual

Help pageTopics
Event-Time dataset for kidney outcomes.ADET
Laboratory dataset for Glomerular Filtration Rate (GFR) measurements.ADLB
Baseline characteristics dataset of patients with kidney function assessments.ADSL
A generic function for coercing data structures to 'hce' objectsas_hce
Coerce a data frame to an 'hce' objectas_hce.data.frame
Coerce a data frame to an 'hce' objectas_hce.default
A generic function for calculating win statisticscalcWINS
Win statistics calculation using a data framecalcWINS.data.frame
Win statistics calculation using formula syntaxcalcWINS.formula
Win statistics calculation for 'hce' objectscalcWINS.hce
A generic function for calculating win oddscalcWO
Win odds calculation using a data framecalcWO.data.frame
Win odds calculation using formula syntaxcalcWO.formula
Win odds calculation for 'hce' objectscalcWO.hce
COVID-19 ordinal scale dataset (full report).COVID19
COVID-19 ordinal scale dataset (preliminary report).COVID19b
COVID-19 ordinal scale dataset for a combination therapy.COVID19plus
A generic function for calculating win odds based on a thresholddeltaWO
Win odds calculation based on a threshold for 'adhce' objectsdeltaWO.adhce
Decompose formula objectsas_formulae as_formulae.formula formulae
The Generalized Log-Logistic DistributiondGLL GLL HGLL hGLL pGLL qGLL rGLL
Helper function for 'hce' objectshce
'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.HCE1
'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.HCE2
'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.HCE3
'HCE1', 'HCE2', 'HCE3', 'HCE4' datasets for 1000 patients with different treatment effects.HCE4
Calculates patient-level individual win proportionsIWP
Kidney Hierarchical Composite Endpoint dataset.KHCE
Minimum detectable or WO for alternative hypothesis for given power (no ties)minWO
A plot method for 'hce' objectsplot.hce
A print method for 'hce_results ' objectsplot.hce_results
Power calculation for the win odds test (no ties)powerWO
A print method for 'hce_results' objectsprint.hce_results
Proportion of wins/losses/ties given the win odds and the win ratiopropWINS
A generic function for win odds regressionregWO
Win Odds Regression Using a Data FrameregWO.data.frame
Win Odds Regression Using a Formula SyntaxregWO.formula
Simulate random numbers from a Weibull distribution with gamma frailtyrweibullGF
Simulate an 'hce' objectsimHCE
Simulate a kidney disease 'hce' datasetsimKHCE
Simulate ordinal variables for two treatment groups using categorization of beta distributionssimORD
Simulate an 'adhce' dataset with two correlated outcomes (illness - death model)simTTE
Sample size calculation for the win odds test (no ties)sizeWO
Sample size calculation for the win ratio test (with WR = 1 null hypothesis)sizeWR
A generic function for stratified win odds with adjustmentstratWO
Stratified win odds with adjustmentstratWO.data.frame
Stratified win odds with adjustment using formulastratWO.formula
A generic function for summarizing win oddssummaryWO
Win odds summary for 'adhce' objectssummaryWO.adhce
Win odds summary for a data framesummaryWO.data.frame
Win odds summary using formula syntaxsummaryWO.formula
Win odds summary for 'hce' objectssummaryWO.hce