Enhancements
paired_boot argument to adjusted_curve_diff() and adjusted_curve_ratio(). With use_boot=TRUE and the new default paired_boot=TRUE, the variances of the two curves and their covariance are now estimated from the paired bootstrap estimates, so the standard errors, confidence intervals and p-values no longer assume that the two curves are independent. This mainly affects methods in which both curves are estimated using the same model, such as method="direct", where the previous intervals were conservative. paired_boot=FALSE gives the previous behavior. The bootstrap confidence intervals of plot_curve_diff() and plot_curve_ratio() change accordingly, as suggested by @HUI950319 (#63)Bug Fixes
adjustedsurv() with method="km" and conf_int=TRUE, where the se column contained the standard error of the cumulative hazard returned by survfit() instead of the standard error of the survival probability. The survival curves and their confidence intervals were not affected, but the confidence intervals and p-values of adjusted_curve_diff(), adjusted_curve_ratio(), plot_curve_diff() and plot_curve_ratio(), and the confidence intervals pooled over multiply imputed datasets, were based on a standard error that was too large by a factor of 1/S (#61)New features
"iptw_cens" method to the adjustedsurv() function, which is a weighting based method that simultaneously allows adjustment for confounding via IPTW and adjustment for dependent censoring via IPCW.Enhancements
parallel_backend argument to adjustedsurv() and adjustedcif() to allow usage of FORK based parallel backends on Linux and MacOS, as suggested by @HUI950319adjustedcif() with method="direct" now directly supports Fine & Gray models fit using mets::cifregFG() (or other models fit using mets::cifreg()) in the outcome_model argument. The adjusted CIFs are then estimated using mets::survivalG(), which also provides influence function based standard errors, so that confidence intervals can be obtained without bootstrapping, as suggested by @HUI950319 (#59)Bug Fixes
adjustedsurv() with method="iptw_km", when one or more rows of the supplied data contained an event exactly at time 0.times argument in adjustedsurv() sometimes produced errors with method="km" when a value in times was beyond surv = 0 for one or more groups.Refactored
surv_() and cif_() functions, as they are not meant to be called outside adjustedsurv() or adjustedcif().Enhancements
as_ggsurvplot_df(), even when method = "km" was used. Additionally, with multiple imputation, the correctly pooled values are now included, instead of nothing.ggplot2 based functions, so that the weird messages about unused labels no longer appear with newer versions of ggplot2.Bug Fixes
plot.adjustedsurv() with the times argument in case a dataset with multiple imputation was supplied.cuminc() function when using adjustedcif() with method="aalen_johansen". Essentially, the step functions were evaluated at the time before the actual step, so that any results obtained by using the previous versions were off by one time step. With many points in time the changes should be small, but with only a few events there might be substantial differences.adjustedcif() was used with non-competing risks data and method="iptw_pseudo", method="aiptw_pseudo" or method="direct_pseudo".New features
extend_to_last argument to method="iptw_km" in adjustedsurv(), which allows users to draw the IPTW survival curves up to the last observed point in time per group whether that time was censored or not. Unpublished simulation studies have shown that estimates beyond the last event time are very unstable, which is why in previous versions of this package (<= 0.11.2), this argument did not exist, but was essentially set to FALSE. To get the same results as with old versions, set this argument to FALSE.Refactor:
difference and ratio argument from adjusted_rmst() and adjusted_rmtl()Bug Fixes
censoring_model argument being ignored when using method="aiptw" in adjustedcif().risk_table=TRUE with risk_table_type="n_events" or risk_table_type="n_cens", events or censored observations at the same point in time were mistakenly excluded (a < was used internally instead of <=). This has been fixed, potentially leading to different results than earlier with discrete values of time.Bug Fixes
...) syntax not being correctly evaluated. For example, supplying estimand="ATT" to adjustedsurv() with method="iptw_km" and a formula in the treatment_model argument would result in the estimand argument not being passed to weightit().plot.adjustedsurv() when the adjustedsurv object was created in a function or loopEnhancements
New features
plot.adjustedsurv() (all arguments starting with risk_table)plot_rmst_curve() functionplot_rmtl_curve() functionadjusted_surv_quantile() functionRefactored
adjsurv and adjcif output objects of adjustedsurv() and adjsutedcif() respectively to adjdifference and ratio arguments into one contrast argument in adjusted_rmst(), adjusted_rmtl(), adjusted_surv_quantile(), plot_rmst_curve() and plot_rmtl_curve() functionstmle in adjustedsurv() and adjustedcif() due to concrete being removed from CRANDocumentation
Enhancements
iso_reg and force_bounds to adjustedsurv() and adjustedcif() functions to allow applying correction techniques outside plotting as wellvariable, ev_time or event contain missings, includes the new mi_extrapolation argument in adjustedsurv() and adjustedcif()ratio argument to adjusted_rmst() and adjusted_rmtl() functionsto values in adjusted_rmst() and adjusted_rmtl(), which speeds up plot_rmst_curve() and plot_rmtl_curve() considerablyBug Fixes
adjusted_rmst(), adjusted_rmtl() and output of adjusted_curve_test() and functions that rely on those functions. This is fixed now, but may lead to slightly different estimates than in previous versions.New Features
surv_tmle and cif_tmle, based on the concrete packagesurv_iv_2SRIFsurv_prox_iptw, surv_prox_aiptw based on code from Andrew Yingadjusted_curve_ratio() functionplot_curve_ratio() functionDocumentation
WeightIt as suggested by Noah GreiferWeightIt packageprint method to be equal to summary method