The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Additional information

Model formula and outcome.type in cifcurve() and polyreg()

Common ground

Key differences

Event coding conventions incifmodeling and CDISC ADaM ADTTE

When working with survival data, one common source of confusion arises from inconsistent event coding conventions between the standard input of Surv(), provided by the survival package, and the CDISC ADaM ADTTE (Analysis Data Model for Time-to-Event Endpoints) used in regulatory clinical trials. With Surv(), event is often coded as 1 and censoring is coded as 0. By contrast, the CDISC ADaM ADTTE (commonly used in pharmaceutical submissions and SDTM-based analyses) follows the opposite convention. CNSR = 0 means that event occurred and CNSR = 1 represents censoring, which aligns with the broader ADaM convention (where 1 = TRUE).

To accommodate differences in coding conventions, one can explicitly specify event and censoring codes using the code.event1 and code.censoring arguments in cifcurve(), cifplot(), cifpanel() and polyreg(). This allows users to perform accurate survival analysis using functions from the cifmodeling package while maintaining the CDISC ADaM ADTTE coding scheme.

polyreg(Event(AVAL, CNSR) ~ ARM, data = adtte, 
        outcome.type = "survival", code.event1=0, code.censoring=1)

Key arguments of msummary() that are helpful when reporting polyreg() results

You can also supply multiple model summaries as a named list to compare estimates across specifications in a single table. See vignette('modelsummary') for a comprehensive overview of additional layout and styling options.

Processing pipeline of cifcurve()

A user-specified model formula in Event() or Surv() is first parsed by util_read_surv() to extract the time-to-event, the event indicator, optional weights, and any stratification variables. Those components are then passed to the back-end estimators implemented in src/calculateAJ_Rcpp.cpp. The C++ routine supports both weighted and stratified data, so the heavy lifting for the Kaplan-Meier or Aalen-Johansen estimates (and associated at-risk, event, censor counts and influence functions) happens efficiently regardless of how the input was specified. The error argument determines how SEs are computed.

Processing pipeline of polyreg()

Input pre-processing mirrors the survival workflow by calling util_check_outcome_type(), reg_check_effect.measure(), and reg_check_input() to parse the format of inputs, event codes, exposure levels, and requested estimands before createAnalysisDataset() builds the modeling frame and reg_normalize_covariate() rescales covariates by default. Starting values are obtained from the nuisance model fits via getInitialValues() or getInitialValuesProportional(), or, when necessary, from user-supplied data frame of starting values. Inverse-probability-of-censoring weights for survival and competing-risks outcomes are calculated by calculateIPCW(), which in turn wraps the calculateKM() C++ routine to obtain the Kaplan-Meier estimates of censoring, while the proportional models assemble matrices through calculateIPCWMatrix().

The weighted estimating equations are then solved by solveEstimatingEquation(), which dispatches to specific score functions such as estimating_equation_ipcw(), estimating_equation_survival(), and estimating_equation_proportional() and iterates with nleqslv/Levenberg-Marquardt updates until the convergence criteria in assessConvergence() are met. Sandwich variances come from calculateCov() or calculateCovSurvival() and are rescaled back to the original covariate scale by reg_normalize_estimate(), while optional bootstrap intervals reuse the same solver inside the boot resampling loop. The resulting influence functions, weights, and fitted CIFs are retained in diagnostic.statistics for downstream diagnostics.

Reproducibility and conventions for polyreg()

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.