- Begin writing tutorials for use cases.
- fix decision tree layout
- progress [Develop automated reporting of all scales and measures for quarto documents.]
- [qini cost options] done [tick!].
- remove
color
package - methods
- replace
stringr
and usetools
- get standard deviation units into reports
- batch process trend plots
- convert values in decision tree plots from standard deviation units to data scale in
margot_interpret_policy_tree
- clean up require packages in
margot_wide_machine()
and elsewhere [tick!].
margot_combine_results
Takes multiple results tables frommargot_plot
objects and combines them into a single formatted table usingkableExtra
, with optional group headers for each section.
-margot_plot
has option standardize_label
which when to display Standardised, Standardized, or to remove it altogether ("none").
- For Risk Ratios (type = "RR"), the code always omits that word and shows the label as "Effect (Risk Ratio Scale)".
- For Risk Differences (type = "RD"), if standardize_label = "NZ" you get "Standardised Effect (Difference Scale)"; if standardize_label = "US" you get "Standardized Effect (Difference Scale)"; and if standardize_label = "none", you get "Effect (Difference Scale)".
margot_plot
has a new parameterinclude_coefficients
which if set to TRUE will remove the coefficients from a graph. This makes it easier to view the results.- minor fix to
margot_save_png
so that it defaults to the output folder set bypush_mods
margot_impute_carry_forward()
- prevents imputing variables at end of study if they are included as time-varying variables.
margot_impute_carry_forward()
is more efficient. Can carry forward more than one-wave if a future observation is made and 'require_one_observed' is set to "TRUE".
- re-factored
margot_make_tables()
to work with the table1 package, for extending flexibility of tables (esp with latex.)
margot_prop_missing()
- utility function to get propoportion of missing data at baseline.
margot_amelia_to_mice()
- fixed to be unconstrained to previous workflow.
margot_plot()
label now reads "causal difference" rather than "causal risk difference".
-margot_impute_carry_forward
- carry forward last observed value (for handling 'prodigal' id's that are lost and found).
margot_wide_machine
- removed functionality now handled bymargot_impute_carry_forward
margot_make_table()
- flexible longitudinal tablesmargot_amelia_to_mice()
- convertsAmelia
output tomice
output.
margot_count_ids()
- track cumulative counts of participants, returning participants,
margot_count_dyads()
- more informative information.
margot_interpret_marginal
clean appearance
margot_plot
andmargot_interpret_marginal
functions overhauled again to focus on compact reporting.
margot_plot
andmargot_interpret_marginal
functions overhauled again to focus on compact reporting.
margot_plot
andmargot_interpret_marginal
functions
margot_plot
to work with newmargot_interpret_marginal
function
margot_interpret_marginal
removed cli formatting for compatibility with quarto documents
margot_wide_impute
- small bug fix, na indicators not automatically created (functionality was lost at previous iteration)
margot_process_longitudinal_data_wider
- more robust.margot_wide_impute
- small bug fix.
margot_censor
create censoring indictors for correct handling of lost-to-follow-up when conditions are not met, includes a clustering variable (useful for romantic dyads)
margot_wide_machine
now correctly handling multiple time points.
margot_wide_machine()
correctly handles NA values at baseline, and prints out message
margot_save_png()
better defaultsmargot_plot()
enhancements, and improved documentation
margot_save_png()
flexibly handles any plot object, not merely ggplot2 objects.
margot_interpret_marginal()
gives correct interpretation of 'strong' evidence using Evalues.
margot_process_longitudinal_data_wider()
performance enhancement. Users can save the outcome variable even if previous exposures are missing. Useful forlmtp
survival models
margot_process_longitudinal_data_wider()
performance enhancementmargot_wide_machine()
simplified. We now have a time-varying treatment workflow in place!
-
margot_wide_machine()
converts wide data to long data so using indicators for missing observations, which allows for non-parametric stacked learning inlmtp
without multiple-imputation assumptions. Also handles more than three time-points. Optionalimputation_method = 'mice
allows users to impute, while also creating NA dummy variables for non-parametric learning. -
margot_process_longitudinal_data_wider()
extends flexibility ofmargot_process_longitudinal_data()
to more than three waves, and allows users to specify variable names.
- helper function
back_transform_estimates()
is unique for the marginal plots and marginal interpretation, to avoid confusions with back-transforming helpers for split-points in policy trees.
margot_plot()
, andmargot_interpret_marginal()
produce interpretable results. Fixed issue withmargot_plot()
when risk ratios are selected, where colours were not being plotted.
margot_plot_slope_covariate_combo()
- batch multiplemargot_plot_slope_covariate()
plots onto one graph usingpatchwork
.
margot_plot_slope_covariate()
improved for flexibility
margot_plot_histogram()
now take optionalvertical_facets
parameter, allowing for more interpretable time-series graphs.- placed all internal function under
helpers.R
in the R directory, to avoid clutter.
margot_plot()
margot_interpret_marginal()
now back transform values to data scale.
margot_plot_policy_tree()
,margot_plot_decision_tree()
,margot_interpret_policy_tree()
,margot_plot_qini_tree()
use same global function names. New helper functions back-transform logged values (as well as z-transformed values) so that we get interpretations on the data scale for variables that have been log-transformed. This aids with interpretation.
- Refactored causal tree graphs and interpretations for flexible labelling and for providing both standardised results (where relevant), and results on the data scale. Makes the interpretation of policies easier to understand.
margot_count_dyads()
counts dyads in a longitudinal dataset.margot_summary_panel()
summaries participants by panel wave; counts unique participants by wave, ...margot_interpret_policy_batch()
interprets the policytree results.
margot_summary_tables()
- now pass multiple tables, better exposure plots.margot_interpret_policy_tree()
- refactored: now returns results on data scale, better labels.margot_plot_policy_tree()
- refactored: now returns results on data scale, better labels.
margot_batch_policy()
margot_plot()
,margot_interpret_marginal()
,group_tab()
overhauled so that now we get reporting back-tranformed from standardised effects to effects on the data scale -- greatly benefiting interpretations.transform_to_original_scale()
new helper introduced to back-transform estimates.
margot_save_png()
replacesmargot_plot_save_png()
for consistent function labelling, and to spare a burden of remembering function names.
margot_compare_groups()
added bold formatting to alert readers to reliable group differences
margot_interpret_qini()
- now formats tables to alert readers to where prioritising results are reliably worse or better than than none.
margot_plot_create_options()
updated to work with improve plotting workflow
compute_difference()
now use the more generalmargot_compare_groups()
workflow.
- Removed the following deprecated functions from vignettes, instead use https://github.com/go-bayes/boilerplate
boilerplate_measures
boilerplate_methods_additional_sections
boilerplate_methods
boilerplate_methods_causal_interventions
boilerplate_methods_confounding_control
boilerplate_methods_eligibility_criteria
boilerplate_methods_identification_assumptions
boilerplate_methods_missing_data
boilerplate_methods_sample
boilerplate_methods_statistical_estimator
boilerplate_methods_target_population
boilerplate_methods_variables
create_ordered_variable_custom
margot_compute_gender_weights
margot_create_bibliography
margot_create_database
margot_grf_subset_table
margot_merge_databases
manager_boilerplate_measures
compute_difference()
margot_plot_save_png()
saves a margot_plot output graph as a png, user can change width, heigh, dpi, and specify a path...
margot_plot()
automatic saving of the output with optional timestampsmargot_plot_multi_arm()
modified to work with new and improvedmargot_plot()
margot_compare_groups()
compare treatment effects by groups and evaluate evidence for differences
margot_plot_multi_arm()
wrapper formargot_plot
that enables each plots/tables for multi arm treatment models
- reporting of multi arm treatment models in
margot_plot_qini()
is easier to follow. margot_lmtp()
now has automatic saving of models with optional prefix label and optional time-stamping. Also actually saves table when computing contrasts with only the null model.
margot_interpet_qini()
robust for both binary and multi-arm treatments.margot_plot_qini()
correct label for binarhy treatmentsmargot_batch_policy_tree()
correctly modified function added: commputes multiple 'spends'
margot_interpet_qini()
interprets results of the qini curves at pre-specified levels.
extract_qini_data()
improved handling ofmargot_multi_arm_causal_forest()
- numerous plot functions enhanced to produce "NZ" instead of "Nz"
margot_summary_cate_difference_gain()
computes the difference in average gains and the integrated difference between a reference curve (maq object) and a comparison curve at a specified spend level -- to see if there is support for CATEs
compute_qini_curves_multi_arm()
- modified so that we can now get quantitative estimates for support for CATEsmargot_multi_arm_causal_forest()
- enhanced in several ways, for example to supportmargot_summary_cate_differences()
margot_causal_forest()
- likewise enhanced.margot_batch_policy()
now outputs `margot_summary_cate_difference_gain() models by default
margot_summary_tables()
plots take upper case letters, remove '_'margot_adjust_weights()
censored individuals are assigned zero weights, and only uncensored individuals contribute to the final analysis.
- Fixed
margot_plot_response_timeline()
to print dates, and to optionally save a 'png` image.
margot_plot_discontinuity()
andmargot_plot_slope()
have correct end years (+1 final wave, as waves overlap years)
margot_plot_boxplot_covariate()
descriptive trends by groups
margot_plot_slope_covariate()
automatic title, save png, and optional time stampmargot_plot_individual_responses()
fixed so there is no missingness
- reverted
compute_qini_curves
(only works with binary vars) margot_causal_forest()
now working again
margot_multi_arm_causal_forest()
extract_qini_data()
improved to work withmargot_multi_arm_causal_forest()
compute_qini_curves_multi_arm()
internal function to supportmargot_multi_arm_causal_forest()
- Coordinated the following functions to play well with
margot_multi_arm_causal_forest()
margot_plot_qini()
- `extract_qini_data()``
compute_qini_curves()
hear_read
does not require that an.rds
file is passed.extract_qini_data
made robust
build_formula_str
- helper function now documented. Used in causal_contrast_engine
and causal_contraset_marginal
causal_contrast_marginal
andcausal_contrast_marginal
modified to accommated breaking change inWeigthIt
package.double_robust_marginal
checks if object is a winmids object.
margot_plot_individual_responses()
now plotting all cases by default. Defaultrandom_draws
of 100.
margot_plot_histogram()
, optional coloured mean/sd lines.
margot_plot_individual_responses()
. Now handles factors, and robust to missing waves.margot_plot_boxplot()
different colours for boxplots if a single variable is passed over multiple waves.
margot_plot_individual_responses()
. New function to allow random plotting of responses in a subset of the sample, useful for investigating individual trajectories of change.margot_plot_boxplot()
Now user supplieswave
values, allowing more flexible and precise plotting of intervals. Has optional prefixes. The coordinates of the graph may be optionally flipped.
margot_plot_categorical()
for visualising categorical data distributions.margot_plot_shift()
for visualising shifts in data distributions with highlighted ranges.
The following functions have been deprecated in favor of the new functions:
margot_plot_hist()
is deprecated. Usemargot_plot_histogram()
instead.coloured_histogram()
is deprecated. Usemargot_plot_histogram()
instead.coloured_histogram_shift()
is deprecated. Usemargot_plot_shift()
instead.coloured_histogram_quantiles()
is deprecated. Usemargot_plot_categorical()
instead.
These deprecated functions will continue to work but will issue warnings. They will be removed in a future version of the package.
margot_plot_slope()
allows faceting
margot_plot_histogram()
new histogram that's more informative and more robust than previous attempts. Can be used for multiple variables and multiple waves.
margot_plot_boxplot()
made robust to single outcome in single wave.
margot_plot_discontinuity()
,margot_plot_slope()
,margot_plot_slope_covariate()
automatically print number of unique participants and unique number of observations in the title, if no title is passed.
margot_plot_discontinuity()
now being read to namespace.
margot_plot_slope()
descriptive trends in continuous variables over time; user may pass historical events which are denoted by dashed vertical lines on the plot.margot_plot_slope_covariate()
descriptive trends by covariates over time.margot_plot_bloxplot()
descriptive trends using boxplots + facets.prepare_panel_data()
helper function to get panel data into shape for plotting response timelines for repeated measures studies.margot_response_timeline()
plot histogram of response timelines for repeated measures studies.
here_save_qs()
andhere_read_qs()
report where and object was saved and how large it is.here_save()
andhere_read()
, ditto, and also ask users to specify a directory path, defaulting topush_mods
if none is supplied
margot_plot_discontinuity()
create longitudinal graphs
margot_size()
has cli alerts
read_multiple_images()
utility function to read batchs of images, for presentations, articles etc.
margot_plot_batch_rate
, creates and save rate plots from multiple causal forests outputs..
margot_batch_policy()
allows user to save plots automatically, with different sizes and resolutions.
margot_subset_model()
returns subset of results the user requests.
margot_subset_model()
subsets causal forests for both categorial and binary exposures.
margot_grf_subset_table()
, functions replaced bymargot_subset_model()
, use this new function instead.
margot_qini_plot()
better labels for binary models.
margot_plot_exposure()
- utility to plot change in the exposure variable from baseline.margot_size()
- utility to check size of object
margot_summary_table()
- now provides optional graphs to show densities/distributions of the exposure and outcomes at baseline, exposure waves, and end of study.
margot_plot()
- consistent names for results table if these are modified using the newlabel_mapping
option.here_save_qs()
andhere_read_qs()
minor tweaks.
margot_plot()
andmargot_plot_create_options()
now allow custom labels, which flexibly combine with defaults.
- robust reporting/error handling in
margot_causal_forest()
, and its helper funcitoncompute_qini_curves()
-
boilerplate_measures()
is deprecated. Useboilerplate::boilerplate_report_variables()
instead. -
boilerplate_methods_causal_interventions()
is deprecated. Useboilerplate::boilerplate_report_causal_interventions()
instead. -
boilerplate_methods_confounding_control()
is deprecated. Useboilerplate::boilerplate_report_confounding_control()
instead. -
boilerplate_methods()
is deprecated. Useboilerplate::boilerplate_report_methods()
instead. -
boilerplate_methods_eligibility_criteria()
is deprecated. Useboilerplate::boilerplate_report_eligibility_criteria()
instead. -
boilerplate_methods_identification_assumptions()
is deprecated. Useboilerplate::boilerplate_report_identification_assumptions()
instead. -
boilerplate_methods_missing_data()
is deprecated. Useboilerplate::boilerplate_report_missing_data()
instead. -
boilerplate_methods_sample()
is deprecated. Useboilerplate::boilerplate_report_sample()
instead. -
boilerplate_methods_statistical_estimator()
is deprecated. Useboilerplate::boilerplate_report_statistical_estimator()
instead. -
boilerplate_methods_target_population()
is deprecated. Useboilerplate::boilerplate_report_target_population()
instead. -
boilerplate_methods_variables()
is deprecated. Useboilerplate::boilerplate_report_variables()
instead. -
margot_create_database()
is deprecated. Useboilerplate::boilerplate_manage_measures()
instead. -
manager_boilerplate_measures()
is deprecated. Useboilerplate::boilerplate_manage_measures()
instead. -
margot_create_bibliography()
is deprecated. Useboilerplate::boilerplate_report_measures()
instead. -
margot_merge_databases()
is deprecated. Useboilerplate::boilerplate_merge_databases()
instead. (Note the plural 'databases' in the new function name.) -
to obtain these new functions, use
devtools::install_github("go-bayes/boilerplate")
-
margot_create_bibliography
now prints binary tags correctly. Improved presentation of items, with measures first. -
boilerplate_methods_variables
now acceptsmargot_create_bibliography
.
margot_create_database
further improved: deleted unnecessary prompts, back_up function in place.
boilerplate_measures
andmargot_create_bibliography
better printout. However, again, must develop a package specifically for boilerplates.
margot_create_database
made more robust, menus work better, and you can copy information from other citations. (It's clear this will need to be a separate package,... expect a move down the track)
margot_lmtp
more informative reporting and progress bars usingcli
margot_plot_decision_tree
- user may remove 'Action" labels for cleaner graph, if desired (default is to remove them.)
margot_plot_create_options
helper function to automate graph production.
margot_plot_policy_tree()
,margot_plot_qini
,margot_plot_decision_tree
defaults to nice labels, with informative messages.
margot_interpret_marginal
has consistent syntax withmargot_plot
.transform_table_rownames
to allow for nicer tables with clear labels.- overhauled
margot_plot
function so that it produces nice labels, and so that it also generates an interpretation.
margot_create_bibliography
markdown output improved withcli
- considerably decluttered output of
boilerplate_methods
margot_interpret_table
replaced bymargot_interpret_marginal
- informative
cli
messages forcreate_ordered_variable
,margot_process_binary_vars
,margot_summary_tables
,margot_log_transform_vars
,margot_propensity_model_and_plots
,margot_process_longitudinal_data
,margot_causal_forest
,margot_multiarm_causal_forest
,margot_batch_policy
- integrated
cli
messages for user experience, inmargot_create_database
,margot_merge_databases
, andboilerplate_methods
(more to follow.)
margot_create_database
: allows for creation of bibliography databases.margot_merge_databases
: allows for merging of bibliography databases.margot_create_bibliography
: purpose-build for appendices in which all measures are reported.
- restored
coloured_histogram
to package (still useful)
manager_biolerplate_measures
surpassed bymargot_create_database
boilerplate_measures
overhauled to allow bibliography by sections (for outcomewide studies)- considerably improved reporting in
boilerplate_methods
, including: selective sections to report. - overhauled
boilerplate_methods
for simple and clear reporting - simplified
biolerplate_methods_variables
to act mostly as a wrapper forboilerplate_measures
boilerplate_methods_additional_sections
- baseline_missing_data_proportion passed to
boilerplate_methods_missing_data
. - all boilerplate functions now accessible with package (not just internal), allowing for better selective use.
- allow selective printing of
boilerplate_methods
boilerplate_methods
function allows first pass automated reporting.- helper functions include:
boilerplate_methods_sample
,boilerplate_methods_eligibility_criteria
,boilerplate_methods_identification_assumptions
,boilerplate_methods_statistical_estimator
,boilerplate_methods_confounding_control
,boilerplate_methods_missing_data
,boilerplate_methods_causal_interventions
- implemented
-
manager_boilerplate_measures
now flexibly handles strings for references when 'string_is ...' is used in the reference category thatmanager_boilerplate_measures
creates. -
manager_boilerplate_measures
has been streamlined.
- added
batch_edit_measures
withinmanager_boilerplate_measures
to allow batch editing of measures database.
manager_boilerplate_measures
improved by allowing user-friendly navigation forward and backward, and more sensible defaults. requiresrlang
.
boilerplate_measures
produces an appendix of measures and items uses from variable inputs (for Quarto manuscripts).manager_boilerplate_measures
allows to you add / modify an existing database.
margot_plot
consistent syntax: user specifies save_plot as TRUE or FALSE (default = TRUE).
margot_plot
has auto-save and numerous small improvements.
margot_adjust_weights
to streamline creating inverse probability of censoring weights longitudinally, allowing for sample_weights at baseline.
margot_propensity_model_and_plots
a one stop shop for evaluating balance on the treatment: plots & diagnostics generated.
coloured_histogram()
back by popular demand.
- tweaks to defaults for plots to make them more legible on small computer screens.
-
margot_plot_policy_combo
,margot_policy_tree
,margot_batch_policy
and now accepts arguments formargot_plot_decision_tree
andmargot_plot_policy_tree
, leading to customisable policy visualisations. -
Bigger defaults for x and y axis text in
margot_plot_policy_tree
for legibility.
margot_batch_policy
runsmargot_policy_tree
for all outcomes in a model.
margot_plot_policy_combo
: creates a combination plot formargot_plot_decision_tree
andmargot_plot_policy_tree()
, easing the burden of interpretation.
margot_plot_decision_tree
: policy action leafs different colours (user may specify palette). Defaults toggokabeito::scale_fill_okabe_ito()
to matchmargot_plot_policy_tree()
margot_policy_tree
outputs amargot_plot_policy_combo
in addition to the other otuputs.
- removed
split_vars
from themargot_causal_forest
andmargot_mulit_arm_causal_forest
margot_plot_decision_tree
correct tree arrangement
margot_plot_policy_tree
correctly renders decision tree, allows for individual plots for decision leafs, and collects guides.- error in rendering of
margot_plot_decision_tree
, fixed: function now includes internal tests. - removed
split_vars
from themargot_causal_forest
andmargot_mulit_arm_causal_forest
debug_node_data_with_positions
, internal function - utility now included withmargot_plot_decision_tree
-
margot_plot_decision_tree
creates policy tree decision rule graphs in a ggplot2 format, so that the graph may be combinedmargot_plot_policy
to more effectively communicate decision rules to policy makers. -
debug_node_data_with_positions
internal so thatmargot_plot_decision_tree
works properly
margot_plot_decision_tree
requiresdebug_node_data_with_positions
- Enhanced
margot_plot_policy
so that it produces amargot_plot_decision_tree
graph, as well as its previous outputs.
margot_interpret_policy_tree
interprets policy_tree outputs with outputs in either markdown or \LaTeX formats.margot_policy_tree
wrapsmargot_interpret_policy_tree
,margot_plot_policy_tree
,margot_qini_plot
and a decision tree visualisation within one function.
margot_plot
will now work even if no title or subtitle is passed.margot_plot_policy_tree
: focus is not simply on plotting, rather than doing both plotting and interpreting.margot_interpret_table
: no longer requires specification of estimate. General explanation printed separately (as it is only used once).
- Greatly enhanced the functionality of
margot_plot_policy_tree
so that it explains the result.
- broken indexing when I changed
margot_causal_forest
andmargot_multi_arm_causal_forest
to use outcome names, rather than model names.
margot_causal_forest
andmargot_multi_arm_causal_forest
now use outcome names, rather than model names, to name the outcomes
margot_process_longitudinal_data
orders correctly forlmtp
models by updating the censoring columnnot_lost
such that it handles missing responses as well as attrition. The function additionally automatically dummy codes ordinal variables and standardises continuous variables. Presently it is only implemented for three waves, but in the future it will be expanded to handle arbitrarily many.
- Functions
compute_qini_curves
andextract_qini_data
to work with binary interventions
margot_summary_tables
creates summary tables of baseline variables, exposure(s), and outcome(s) using thegtsummary
package.
margot_compute_gender_weights
is deprecated. Now usemargot_compute_gender_weights_by_wave
.
coloured_histogram()
andcoloured_histogram_quantile()
are deprecated. Now use the newmargot_plot_hist()
instead.create_ordered_variable_custom
is deprecated. Now usecreated_ordered_variable
function withcustom_breaks = c(..)
to obtain custom breaks.
margot_plot_hist()
for plotting distributions of the exposure variable
- new table and plot functions for
grf
outputs
- improved subgroup comparison function
- deprecated
compare_group_means
function, withcompare_group
allowing for contrasts of on both the causal difference and relative risk scales. - new wrapper functions functions for
grf
plus visualising results.
- group_tab now works under the hood of margot_plot, so no need to specify explicitly
- group_tab now allows custom order for plot, not just by decreasing effect size
- numerous small enhancements to older parametric model options
- new logo
- minor fixes
- functions to interpret outputs of
lmtp
models - functions to create tables
- functions to create graphs
- Minor bug fixes and performance improvements.
- Initial release: includes data exploration, model preparation, utility functions.