changelog.Rmd
estimate_ipwhr
. This implements the model described in
Hernán et al. (2000) Marginal Structural Models to Estimate the
Causal Effect of Zidovudine on the Survival of HIV-Positive Men for
a point treatment.identify_interval
object documentation and in the manual about using time-varying
covariates.identify_censoring
all have values between 0
and 1, inclusive..Start
column name has been added as a reserved
name for the input data.make_table1
:
make_table1
that resulted in rows
that had entries with 0 weights sometimes being dropped.make_table1
support for SMDs when there are more
than two treatment groups. make_table1
now provides an SMD
column for each pairwise combination of treatment groups.compute_cumcount_effect_ci
now throws an error if an
invalid boot_method
input was provided.make_table2
, plot
, and
forest_plot
methods now explicitly check that cumulative
count effect measures aren’t specified for cumulative risk methods and
vice versa, and throw an error in such a case.compute_cumrisk_effect_ci
and
compute_cumcount_effect_ci
:
effect_measure_type
and
boot_method
are each stringseffect_measure_type
and boot_method
when the
input results object performed bootstrapping.smd
function now checks that the stratifying
variable has exactly two levels in it.compute_cumcount_effect_ci
,
compute_cumrisk_effect_ci
, make_table2
,
named_list
, plot_boot_cumrisk
,
table2_helper_cumcount
, table2_helper_cumrisk
to include details about the various available effect measures.plot
and moved
the content from the plot.cumcount
,
plot.cumrisk
, and plot.hr
in the entry.effect_measure_select
entry.actg
,
example4
, leukemia
, and wihs
datasets.Plotting counterfactual cumulative risk and effect measures
and
Table 2s for counterfactual cumulative risk and effect measures
.estimate_ipwhr
correctly handles function inputs with
scopes outside of the lexical scope of the function definition.estimate_ipwrisk
, estimate_gcomprisk
,
estimate_aipwrisk
,
estimate_aipwrisk_efficient
,
estimate_ipwcount
, and estimate_ipwhr
return
objects now include an element called data
rather than
called dataq
containing a value of the input data rather
than a quosure.Added a new function estimate_ipwhr
which enables
estimation of counterfactual hazard ratios with inverse probability of
treatment weighting and inverse probability of missingness weighting.
Objects produced by this function have class hr
.
Added a new vignette called Hazard ratios describing the
theory and usage of estimate_ipwhr
.
Provided a new is.hr
function to check whether an
object inherits from the hr
class.
Added make_table2
, forest_plot
and
plot
methods for the hr
class.
Provided a new hr_data
function, which takes results
of estimate_ipwhr
and returns a data frame with information
backing the make_table2.hr
and plot.hr
methods.
Added a new inspect_ipw_weights
function that
produces the per-subject weights for ipw
objects.
Exposed the boot_method
formal argument to the
existing make_table2
, plot
, and
forest_plot
methods.
estimate_ipwrisk
now produces per-subject weights
(with the intention that they will be accessed by the user via
inspect_ipw_weights
).
compute_cumrisk_effect_ci
throws an error if an
input of "log-normal"
for boot_method
is used
with any input for effect_measure_type
other than
"RR"
or "CR"
since otherwise it can result in
the logarithm function being evaluated for a non-positive
values.
compute_cumrisk_effect_ci
throws an error if any
input for boot_method
is provided other than
"normal"
or "log-normal"
rather than returning
a data frame without variance information.
Fixed a bug in compute_cumcount_effect_ci
that would
result in an unintended error when using a "log-normal"
input for boot_method
.
make_table2.cumrisk
now throws an error if any input
for boot_method
is provided other than
"normal"
or "log-normal"
.
knitr and forcats are each removed from the list of
Imports
. knitr and rmarkdown are each added to the list of
Suggests
. The package lower bound for gt was changed from
v0.5 to v0.6.
Added testing for all new routines.
Added testing of estimate_ipwhr
per-subject
weights.
Added regression tests for estimate_ipwrisk
to
ensure that newer versions of the function produce the same cumulative
risk results and variances as for v0.39.06.
Added testing of boot_method
input options for
make_table2.cumrisk
, make_table2.cumcount
,
plot.cumrisk
, plot.cumcount
, and
forest_plot.cumrisk
.
Added an assertion that subject IDs are unique unless
time-varying covariates specified. That is, across all estimators, prior
to computing the estimates there is a check that there are no duplicated
subject IDs. Duplicated subject IDs in the source data are only allowed
if identify_interval
is used to indicate time-varying
data.
make_table1
rewritten to utilize the gt
package, thus allowing far more customization and exporting
ability.compare_fits
and allow
user to choose alpha level for confidence intervals.estimate_aipwrisk
when
fully_efficient = TRUE
, by rewriting the internal function
integrator
and helpers.compare_fits
function, which allows for the
comparison of multiple fit objectsstart>stop
time warnings when
using time-varying covariates and times
argument is
provided.estimate_aipwrisk
when competing risks are present. Bug was
introduced in version 0.36.17.NaN
risk estimates when no
censoring model is specified, there are tied event times, the last
observed event/censoring times are tied, and everyone either has the
event or censoring.forest_plot.cumrisk
so that
when no risk time is passed, it uses the maximum time in each input
object.make_table1
that
causes SMDs lower than 0.01 to be displayed as “<0.01”.plot.cumrisk
and
plot.cumcount
to allow any number of treatment levels.scale_pt_display
argument in
make_table2
.calc_rate_ci
argument in make_table2
.make_table2
that prevented selecting
correct treatment reference level when multiple objects were
passed.right_join
fuction in dplyr
.Added overlap weights as an option.
Added discussion of different weighting methods to manual.
Bug fix. SMR weights were incorrect with more than 2 levels of treatment.
Changed censoring behavior. Now, censoring by end of follow-up is
not treated as a censoring event to be modelled by the censoring models.
To replicate analyses conducted with older versions of the package,
specify tau_censor = TRUE
when calling the estimation
function.
Bug fix. When subgroup_ps is FALSE, the wrong n was being returned by the estimating functions.
Bug fix. When user supplied weights or a subgroup, efficient AIPW threw an error.
Bug fix. When missing data are present, the output prediction vector was the wrong length for AIPW.
Bug fix. make_table1
was inconsistent when
identify_subject()
was used.
Bug fix. When using R versions greater than 4, error was thrown when using efficient AIPW with null models.
Fix warning related to RNG in future package.