# Hand-maintained NAMESPACE for oda.
# Run devtools::document() to regenerate from roxygen if @-tags are added.

# ----- Primary public API -----
export(oda_fit)
export(oda_univariate_core)
export(oda_multiclass_unioda_core)
export(oda_rule_predict)
export(oda_rule_predict_multiclass)

# ----- Metrics -----
export(oda_confusion_binary)
export(oda_confusion_multiclass)
export(oda_mean_pac)
export(oda_ess_from_meanpac)
export(oda_ess_from_mean)

# ----- ODA S3 methods and accessors -----
S3method(predict, oda_fit)
S3method(print,   oda_fit)
S3method(summary, oda_fit)
S3method(print,   oda_fit_summary)
export(oda_predictions)
export(oda_confusion)
export(oda_metrics)
export(oda_d_stat)

# ----- CTA -----
export(oda_cta_fit)
export(cta_fit)
export(lort_fit)
export(lort_local_tree)
export(lort_index_path)
export(lort_path_table)
export(cta_node_table)
export(cta_strata)
export(cta_endpoint_denominators)
export(cta_min_terminal_denom)
export(cta_d_stat)
export(cta_descendant_family)
export(cta_family_table)
export(cta_endpoint_table)
export(cta_endpoint_summary)
export(cta_endpoint_counts)
export(cta_staging_table)
export(cta_propensity_weights)
export(cta_assign_endpoints)
export(cta_observation_weights)
export(cta_confusion_table)
export(as_confusion_matrix)
export(cta_confusion_matrix)
export(cta_plot_data)
export(ort_plot_data)
export(cta_ort_node_table)
S3method(plot,    cta_tree)
S3method(predict, cta_tree)
S3method(print,   cta_tree)
S3method(summary, cta_tree)
S3method(print,   cta_tree_summary)
S3method(summary, cta_family)
S3method(print,   cta_family)
S3method(print,   cta_family_summary)
S3method(plot,    cta_ort)
S3method(predict, cta_ort)
S3method(print,   cta_ort)
S3method(summary, cta_ort)
S3method(print,   cta_ort_summary)

# ----- SDA -----
export(sda_fit)
export(sda_selected_attributes)
export(sda_step_table)
export(sda_candidate_table)
export(as_cta_candidates)
export(sda_to_cta_data)
export(auto_sda_plan)
S3method(print, auto_sda_plan)
S3method(predict, sda_fit)
S3method(print,   sda_fit)
S3method(summary, sda_fit)
S3method(print,   sda_fit_summary)

# ----- SDA anchor -----
export(sda_anchor)
export(as_sda_anchor)
export(validate_sda_anchor)
S3method(as_sda_anchor, sda_fit)
S3method(as_sda_anchor, data.frame)
S3method(print,   sda_anchor)
S3method(summary, sda_anchor)
S3method(print,   sda_anchor_summary)

# ----- Graphics v3 -----
export(plot_cta_tree)
export(plot_lort_tree)
export(plot_lort_path)
export(plot_cta_family)
export(plot_oda_balance)
export(plot_smd_balance)
export(plot_balance_love)
export(plot_cta_balance)
export(plot_oda_balance_effects)
export(plot_cta_balance_effects)

# ----- Covariate balance -----
export(oda_balance_table)
export(smd_balance_table)
export(oda_balance_plot_data)
export(cta_balance_table)
export(cta_balance_plot_data)
export(oda_balance_effect_table)
export(cta_balance_effect_summary)
export(propensity_ess_balance)

# ----- Production tools (Slice Q) -----
export(oda_readiness_check)
export(oda_clean_missing_codes)
export(oda_validate_group)
export(oda_validate_weights)
export(oda_infer_attr_types)
export(oda_propensity_weights)
export(lort_propensity_weights)

# ----- Novometric bootstrap -----
export(novo_boot_ci)
S3method(novo_boot_ci, default)
S3method(novo_boot_ci, oda_fit)
S3method(novo_boot_ci, cta_tree)
S3method(novo_boot_ci, cta_ort)
S3method(print, novo_boot_ci)

# ----- Power / sample size -----
export(oda_power)
export(oda_sample_size)
S3method(print, oda_power)
S3method(print, oda_sample_size)

# ----- Imports -----
importFrom(grDevices, colorRampPalette)
importFrom(stats, dhyper, fisher.test, predict, qbeta, quantile, rbinom, runif, sd, setNames)
importFrom(utils, combn, head, modifyList)
importFrom(graphics, arrows, mtext, par, plot.new, plot.window, polygon, title, segments, rect, text)
