Package index
-
margot_count_dyads()
- count dyads in longitudinal data
-
margot_count_ids()
- count individual participants in longitudinal data
-
margot_plot_boxplot()
- Create panel data Boxplots using ggplot2
-
margot_plot_boxplot_covariate()
- create boxplots with covariates using ggplot2
-
margot_plot_discontinuity()
- Create a Discontinuity Plot for Multiple Events
-
margot_plot_histogram()
- Create a Histogram with Mean and Standard Deviation Highlights for Each Wave and Variable
-
margot_plot_response_timeline()
- Plot Panel Study Response Timeline
-
margot_plot_slope()
- Create a Slope Plot for Multiple Variables
-
margot_plot_slope_covariate()
- Create a Slope Plot using ggeffects
-
margot_plot_slope_covariate_batch()
- Create a Combined Slope Plot using ggeffects and patchwork
-
margot_plot_slope_covariate_combo()
- Create a Combined Slope Plot using ggeffects and patchwork
-
margot_summary_panel()
- Generate Summary Panel for Margot Study
-
margot_assess_overlap()
- Assess Covariate Overlap from Causal Forest Models
-
margot_make_tables()
- Create Summary Tables Using table1 with Custom Formatting
-
margot_plot_categorical()
- Create a coloured histogram with summary lines and optional median
-
margot_plot_individual_responses()
- Create Individual Longitudinal Response Plots
-
margot_plot_shift()
- Visualise Shifts in Data Distributions with Highlighted Ranges
-
margot_propensity_model_and_plots()
- Create Propensity Score Model and Associated Plots
-
margot_transition_table()
- Format a Transition Table with observed‑indicator filtering
-
create_ordered_variable()
- Create Ordered Variable Based on Quantile Breaks or Custom Breaks with Informative Labels
-
impute_and_combine()
- Perform multiple imputation on a list of data frames and combine the results
-
margot_adjust_weights()
- Adjust Weights for Censoring and Sample Design with Progress Reporting
-
margot_censor()
- Transform year_measured Variable Based on Clustered Conditions Within Waves
-
margot_censor_lead()
- Apply Lead-Based Censoring to Longitudinal Data
-
margot_compute_gender_weights_by_wave()
- Compute Gender-Based Sample Weights Using Baseline Wave Proportions
-
margot_filter()
- Filter Data Based on Exposure Variables
-
margot_impute_carry_forward()
- Impute Missing Values Using Carry Forward in Longitudinal Data
-
margot_log_transform_vars()
- Log-transform Variables in a Data Frame
-
margot_process_binary_vars()
- Process Binary Variables in a Data Frame
-
margot_process_longitudinal_data()
- process longitudinal data for three waves
-
margot_process_longitudinal_data_wider()
- Process longitudinal dyadic data in wide format with censoring by missing exposure and silent dummy-coding
-
margot_wide_machine()
- Transform longitudinal data to wide format with baseline imputation and optional NA indicators
-
margot_causal_forest()
- Run Multiple Generalized Random Forest (GRF) Causal Forest Models with Enhanced Qini Cross-Validation
-
margot_lmtp()
- Batch Process LMTP Models
-
margot_naive_regressions()
- Perform Naive Cross-Sectional Regressions
-
margot_policy_tree()
- Recompute Policy Trees with Custom Parameters
-
margot_policy_tree_stability()
- Stability Analysis for Policy Trees
-
margot_policy_tree_bootstrap()
- Bootstrap Analysis for Policy Trees
-
margot_assess_variable_correlation()
- Assess Variable Correlations for Policy Tree Analysis
-
margot_identify_variable_clusters()
- Identify Variable Clusters for Policy Tree Analysis
-
margot_stability_diagnostics()
- Diagnose Policy Tree Stability
-
margot_recalculate_policy_trees()
- Recalculate Policy Trees with Custom Covariates
-
margot_recompute_ate()
- Recompute Average Treatment Effects with Different Target Samples
-
margot_recompute_ate_batch()
- Batch Recompute ATEs for Multiple Target Samples
-
margot_bind_tables()
- Bind and format domain-specific tables or a single table
-
margot_bind_models()
- Combine multiple batched model outputs (with covariates & metadata)
-
margot_compare_groups()
- Compare subgroups from a causal forest model.
-
margot_correct_combined_table()
- Correct a "combined table" for multiplicity **and** recompute *E*-values
-
margot_flip_forests()
- Flip (Reverse) Causal Forest Treatment Effects
-
margot_inspect_qini()
- Inspect qini diagnostics for one or several models
-
margot_interpret_stability()
- Interpret Policy Tree Stability Results
-
margot_interpret_stability_batch()
- Batch Interpret Policy Tree Stability Results
-
margot_interpret_bootstrap()
- Interpret Bootstrap Policy Tree Results
-
margot_interpret_policy_batch()
- Batch process policy tree interpretations
-
margot_interpret_policy_tree()
- Interpret Policy Tree Results
-
margot_interpret_qini()
- Interpret Qini Results
-
margot_interpret_rate()
- Interpret RATE Estimates
-
margot_interpret_rate_cv()
- Interpret CV RATE Results
-
margot_interpret_heterogeneity()
- Interpret Heterogeneity Evidence from Multiple Sources
-
margot_interpret_rate_comparison()
- Compare AUTOC and QINI RATE Tables
-
margot_lmtp_evalue()
- Combine LMTP Summary and E-Value Calculation
-
margot_model_evalue()
- Combine Model Summary and E-Value Calculation for Various Causal Models
-
margot_omnibus_hetero_test()
- Omnibus Heterogeneity Test for GRF Models
-
margot_planned_subgroups_batch()
- Batch process heterogeneity analyses across multiple outcome domains
-
margot_policy()
- Batch Processing of Policy Trees and Related Visualisations
-
margot_qini()
- Generate QINI Curves and Difference Gain Summaries
-
margot_rate()
- Assemble RATE tables (AUTOC and QINI)
-
margot_rate_batch()
- Batch-compute RATEs for each outcome in a margot_causal_forest result
-
margot_rate_cv()
- Cross-Validation Test for Treatment Effect Heterogeneity
-
margot_recompute_qini_aipw()
- Recompute QINI Curves Using AIPW Scores
-
margot_recompute_qini_ipw()
- Recompute QINI Curves Using IPW Scores
-
margot_rescue_qini()
- Post-process models to recover Qini curves via propensity trimming
-
margot_resort_contrast_lmtp()
- Resort/Reorder LMTP Contrasts by Recomputing from Models
-
margot_subset_model()
- Subset Model Results for Binary and Categorical Exposures
-
margot_subset_batch()
- Batch Process Subset Models for Causal Forests
-
margot_summary_cate_difference_gain()
- Compute Difference in Gains and Integrated Difference Between Reference and Comparison Curves
-
get_consensus_info()
- Get consensus tree information
-
get_variable_importance()
- Extract variable importance from bootstrap results
-
summary(<margot_stability_policy_tree>)
- Summary method for stability policy tree results
-
print(<margot_stability_policy_tree>)
- Print method for stability policy tree results
-
summary(<margot_bootstrap_policy_tree>)
- Summary method for bootstrap policy tree results
-
print(<margot_bootstrap_policy_tree>)
- Print method for bootstrap policy tree results
-
print(<margot_correlation_assessment>)
- Print method for margot_correlation_assessment
-
margot_plot()
- Create a Margot Plot with Proper Multiplicity Correction
-
margot_plot_decision_tree()
- Plot a Decision Tree from Margot Causal-Forest Results (robust labelling)
-
margot_plot_multi_arm()
- Create a Multi-arm Margot Plot with User-specified Contrast
-
margot_plot_policy_combo()
- Create a Combined Decision Tree and Policy Relationship Graph
-
margot_plot_policy_tree()
- Plot a policy tree (depth-adaptive)
-
margot_plot_qini()
- Plot Qini Curves from margot_multi_arm_causal_forest Results
-
margot_plot_qini_batch()
- Batch Process and Plot QINI Curves for Multiple Models
-
margot_plot_qini_batch_cost_sensitivity()
- Batch Plot QINI Curves Across Treatment Costs for Multiple Models
-
margot_plot_qini_cost_sensitivity()
- Plot QINI Curves Across Treatment Cost Scenarios
-
margot_plot_qini_cost_summary()
- Create Summary Plot of Optimal Treatment Fractions Across Costs
-
margot_qini_cost_sensitivity()
- Perform Cost Sensitivity Analysis for QINI Curves
-
margot_qini_scale_note()
- Generate Explanatory Note for QINI Scale
-
margot_qini_scale_subtitle()
- Generate Brief Scale Description for Plot Subtitles
-
margot_plot_rate()
- Plot Rank Average Treatment Effect
-
margot_plot_rate_batch()
- Batch Process and Plot RATE Curves for Multiple Models
-
margot_plot_tau()
- Create Faceted Tau Hat Distribution Plots
-
margot_plot_cv_results()
- Plot Cross-Validation Heterogeneity Test Results
-
margot_plot_cv_summary()
- Create summary plot for cross-validation heterogeneity results
-
margot_view_lmtp_structure()
- Helper function to view available models and contrasts
-
back_transform_logmean()
- Back-transform Log-transformed Mean
-
back_transform_log_z()
- Back Transform Z-Score to Original Log-Transformed Scale
-
back_transform_zscore()
- Back Transform Z-Score to Original Scale
-
here_read()
- Read Data Frame or Object from RDS File in a Specified Directory
-
here_save()
- Save Data Frame as RDS File in a Specified Directory
-
here_read_qs()
- Read Data Frame or Object from qs File in a Specified Directory
-
here_save_qs()
- Save Data Frame or Object to qs File in a Specified Directory with Enhanced Compression
-
lmtp_evalue_tab()
- Calculate E-values for LMTP Output
-
margot_back_transform_log_z()
- Create Z-score to Original Scale Mapping for Log-Transformed Data
-
margot_debug_qini()
- Debug Qini Curve Data
-
margot_get_labels()
- Get display labels for multiple variable names
-
margot_invert_measure()
- Invert Measure Values for Reverse Scoring
-
margot_log_transform_vars()
- Log-transform Variables in a Data Frame
-
margot_plot_create_options()
- Create Plot Options for Margot Plot
-
margot_plot_exposure()
- Create a separate exposure plot
-
margot_plot_qini_simple()
- Plot QINI Curves (Simplified Version)
-
margot_qini_alternative()
- Compute QINI Curves (Alternative Implementation)
-
margot_qini_diagnostic()
- Diagnose QINI Gain Discrepancies
-
margot_process_binary_vars()
- Process Binary Variables in a Data Frame
-
margot_prop_missing()
- Proportion of missing data at baseline
-
margot_rescue_qini()
- Post-process models to recover Qini curves via propensity trimming
-
margot_reversed_labels()
- Update label map by marking reversed outcomes
-
margot_save_png()
- Save Margot Plot as PNG
-
margot_size()
- Calculate the size of an R object in megabytes
-
margot_trim_sample_weights()
- Standardise and (optionally) trim sample weights at both ends
-
prepare_panel_data()
- Prepare Panel Data for Timeline Visualization
-
pretty_number()
- Format Numbers with Commas
-
remove_numeric_attributes()
- Remove Attributes from Numeric Columns in a Data Frame
-
regress_with_covariates()
- Generalized Linear Regression with Covariates
-
select_and_rename_cols()
- Select and Rename Columns Based on Criteria
-
df_margot_example
- Margot Example Dataset
-
fetch_margot_data()
- Fetch Margot Example Data
-
list_margot_data()
- List Available Margot Datasets
-
clear_margot_cache()
- Clear Margot Data Cache
-
margot_simulate()
- Simulate longitudinal exposures, outcomes, and covariates
-
margot_simulate_test_data_flip()
- Generate Test Data with Flipped Outcomes