This is the code and configuration for kaplan-meier-function
, an R reusable action for the OpenSAFELY framework.
Given a dataset containing start dates, event dates, censoring dates, treatment groups, the action returns Kaplan-Meier estimates for these characteristics. Additional arguments provide control over estiamtion withn sub-groups, the level of rounding, smoothing, maximum follow-up duration, and other elements.
Further details about this reusable action to follow.
The arguments/options to the action are specified using the flags style
(i.e., --argname=argvalue
), the arguments and how to use them can be
viewed in the km.R
script.
This action can be specified in the project.yaml
with its options at
their default values as follows, where you should replace [version]
with the latest tag from
here,
e.g., v0.0.1
. Note that no space is allowed between
kaplan-meier-function:
and [version]
.
my_kaplan_meier_function_action:
run: kaplan-meier-function:v0.0.1
--df_input=cohort.csv
--df_output=output/km_estimates.csv
...
outputs:
highly_sensitive:
output: output/km_estimates.csv
...
The OpenSAFELY framework is a Trusted Research Environment (TRE) for electronic health records research in the NHS, with a focus on public accountability and research quality.
Read more at OpenSAFELY.org.
As standard, research projects have a MIT license.