-
Notifications
You must be signed in to change notification settings - Fork 31
Z Package conventions
Steven Haesendonckx edited this page Dec 5, 2020
·
2 revisions
- Input is data set, following the Analysis Data Model (ADaM
- Typically calculate model estimates together with confidence limits
- Output is a model object
- prefix vr_est?
An example is vr_est_KM function that estimates the Kaplan-Meier estimates from a Basic Data Structure (BDS) Time-to-Event (TTE) data set. The output is an survfit
object.
- Recognize the model object and proposes a visual pleasing representation
- Layers can be added
- prefix vr_add??
- Plots can be modified using ggplot
An example is vr_plot function that plots the survival function from a survfit
object.
- Recognize the input object and summarizes it accordingly
- output is a data frame with the summarized data
- prefix vr_get??
vr_get_xx allows estimation of p-values, calculation of summary statistics and risktables.
=> Creating new objects = vr_get_xxx eg vr_get_tableone, vr_get_risktable, ... get is more general than create eg create_pvalue sounds weird => adding to plot = vr_add_risktable (uses vr_get_risktable), vr_add_annotation (can use any of the vr_get functions) ...