
Package index
One-call entry point
The main user-facing function. Runs the full pipeline (preprocess_traits → build_phylo_graph → fit_baseline → fit_pigauto → predict → evaluate) and returns a completed data frame.
-
impute() - Impute missing phylogenetic traits (convenience wrapper)
Experimental analysis-aware MI for fixed effects
The analysis model is declared before imputations are drawn. Initial support is one incomplete continuous covariate under MAR with lm, binomial-logit glm, or one-random-intercept lmer. Fixed effects only; the backend passed its package-level fixed-effect gate and remains an experimental, deliberately narrow interface.
-
multi_impute_analysis() - Analysis-aware multiple imputation for narrow regression models
-
with_imputations() - Fit a downstream model on every imputed dataset
-
pool_mi() - Pool downstream model fits across multiple imputations (Rubin's rules)
Stochastic prediction diagnostics
Conformal-width, Brownian/MC-dropout, PMM, and posterior-tree draws. These paths failed or were outside the downstream inferential gate and must not be used as analysis-aware multiple imputations.
-
multi_impute() - Generate experimental stochastic completion datasets
-
multi_impute_trees() - Posterior-tree prediction sensitivity
Pipeline — fine-grained control
Individual steps of the impute() pipeline, exposed for benchmarking and custom workflows.
-
preprocess_traits() - Preprocess trait data: align to tree, encode into latent space
-
build_phylo_graph() - Build a phylogenetic graph representation from a tree
-
make_missing_splits() - Split cells into train/val/test for imputation evaluation
-
mask_missing() - Create an observed/missing mask matrix
-
fit_baseline() - Fit the phylogenetic baseline
-
fit_pigauto() - Fit a pigauto model for trait imputation
-
predict(<pigauto_fit>) - Impute missing traits using a fitted pigauto model
-
evaluate() - Evaluate a fitted pigauto model on its test set
-
evaluate_imputation() - Evaluate imputation performance against known values
Active imputation (sampling-design guidance)
Per-candidate-observation expected uncertainty reduction across every currently-missing cell, using closed-form BM (Sherman-Morrison) variance reduction for continuous / count / ordinal / proportion / zi_count magnitude and label-propagation entropy reduction for binary / categorical / zi_count gate.
-
suggest_next_observation() - Suggest which cell to observe next to maximise imputation precision
Covariate data helpers
Optional helpers for assembling environmental covariate matrices from public data sources. Both are designed to plug into impute(..., covariates = X).
-
pull_gbif_centroids() - Fetch species range-centroid covariates from GBIF
-
pull_worldclim_per_species() - Fetch per-species bioclim covariates from WorldClim v2.1
-
simulate_benchmark() - Run a simulation benchmark for pigauto
-
simulate_non_bm() - Simulate non-BM trait data for benchmarking
-
cross_validate() - k-fold cross-validation for pigauto trait imputation
-
compare_methods() - Compare BM baseline and pigauto methods across replicates
-
pigauto_report() - Generate an HTML benchmark report from a pigauto fit
-
plot(<pigauto_fit>) - Plot diagnostics for a fitted pigauto model
-
plot(<pigauto_pred>) - Plot predictions from a pigauto model
-
plot(<pigauto_benchmark>) - Plot a pigauto benchmark
-
plot_comparison() - Forest-plot style comparison of benchmark results
-
plot_history_gg() - Plot training history (ggplot2, deprecated)
-
plot_uncertainty() - Plot uncertainty ribbons for imputed trait values
-
summary(<pigauto_fit>) - Summary method for pigauto_fit objects
-
calibration_df() - Compute calibration data for probability predictions
-
confusion_matrix() - Compute a confusion matrix for categorical or binary predictions
-
read_traits() - Read trait data from a CSV file or data frame
-
read_tree() - Read a phylogenetic tree from a file
-
save_pigauto() - Save a fitted pigauto model
-
load_pigauto() - Load a saved pigauto model
-
avonet300 - AVONET morphological and ecological trait data for 300 bird species
-
tree300 - Example bird phylogeny for the 300 species in
avonet300 -
trees300 - 50 posterior phylogenies for the 300 species in
avonet300 -
avonet_full - Full AVONET morphological and ecological trait data for 9,993 bird species
-
tree_full - Example bird phylogeny for the species in
avonet_full -
ctmax_sim - Simulated multi-observation-per-species CTmax data