Package: pigauto 0.10.0.9000

pigauto: Fill in Missing Species Traits Using a Phylogenetic Tree

Imputes missing species trait data for comparative analyses by combining three sources of information: phylogenetic similarity (closely related species share similar traits), cross-trait correlations (observed traits inform missing ones), and optional environmental covariates (climate, habitat, geography). Handles continuous measurements, counts, binary variables, ordered categories, unordered categories, bounded proportions, zero-inflated counts, and compositional multi-proportion data in a single call. The method blends a phylogenetic baseline with a graph neural network correction; a per-trait gate calibrated on held-out data ensures the network only contributes when it improves on the baseline. Provides conformal prediction intervals (95% coverage) for continuous, count, and ordinal traits and supports Rubin's-rules multiple imputation for downstream inference, including tree-uncertainty propagation via posterior tree samples. Tested up to 10,000 species. Bundled datasets include a 300-species and a 9,993-species AVONET bird trait + BirdTree phylogeny subset.

Authors:Shinichi Nakagawa [aut, cre]

pigauto_0.10.0.9000.tar.gz
pigauto_0.10.0.9000.zip(r-4.7)pigauto_0.10.0.9000.zip(r-4.6)pigauto_0.10.0.9000.zip(r-4.5)
pigauto_0.10.0.9000.tgz(r-4.6-any)pigauto_0.10.0.9000.tgz(r-4.5-any)
pigauto_0.10.0.9000.tar.gz(r-4.7-any)pigauto_0.10.0.9000.tar.gz(r-4.6-any)
pigauto_0.10.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
pigauto/json (API)

# Install 'pigauto' in R:
install.packages('pigauto', repos = c('https://itchyshin.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/itchyshin/pigauto/issues

Pkgdown/docs site:https://itchyshin.github.io

Datasets:
  • avonet_full - Full AVONET morphological and ecological trait data for 9,993 bird species
  • avonet300 - AVONET morphological and ecological trait data for 300 bird species
  • ctmax_sim - Simulated multi-observation-per-species CTmax data
  • delhey5809 - Delhey et al. (2019) plumage lightness data for 5,809 passerine species
  • tree_delhey - Pruned BirdTree phylogeny for the 5,809 species in 'delhey5809'
  • tree_full - Pruned BirdTree phylogeny for the 9,993 species in 'avonet_full'
  • tree300 - Pruned BirdTree phylogeny for the 300 species in 'avonet300'
  • trees300 - 50 posterior phylogenies for the 300 species in 'avonet300'

On CRAN:

Conda:

5.26 score 1 stars 61 scripts 31 exports 33 dependencies

Last updated from:ab3bd23107 (on main). Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR320
source / vignettesOK292
linux-release-x86_64ERROR240
macos-release-arm64ERROR233
macos-oldrel-arm64ERROR292
windows-develERROR219
windows-releaseERROR214
windows-oldrelERROR229
wasm-releaseOK143

Exports:build_phylo_graphcalibration_dfcompare_methodsconfusion_matrixcross_validateevaluateevaluate_imputationfit_baselinefit_baseline_bacefit_pigautoimputeload_pigautomake_missing_splitsmask_missingmulti_imputemulti_impute_treespigauto_reportplot_comparisonplot_history_ggplot_uncertaintypool_mipreprocess_traitspull_gbif_centroidspull_worldclim_per_speciesread_traitsread_treesave_pigautosimulate_benchmarksimulate_non_bmsuggest_next_observationwith_imputations

Dependencies:apebitbit64callrclicorocpp11descdigestfarverggplot2gluegtableisobandjsonlitelabelinglatticelifecyclemagrittrnlmeprocessxpsR6RColorBrewerRcpprlangS7safetensorsscalestorchvctrsviridisLitewithr

Common pitfalls / FAQ

Rendered fromcommon-pitfalls.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-12
Started: 2026-05-10

Getting started with pigauto: Phylogenetic Imputation via Graph AUTO-encoders

Rendered fromgetting-started.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-12
Started: 2026-04-06

GNN architecture and the math behind pigauto

Rendered fromgnn-architecture.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-26
Started: 2026-05-18

Mixed-Type Trait Imputation

Rendered frommixed-types.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-12
Started: 2026-04-07

Propagating Tree Uncertainty

Rendered fromtree-uncertainty.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-12
Started: 2026-04-18

Readme and manuals

Help Manual

Help pageTopics
Full AVONET morphological and ecological trait data for 9,993 bird speciesavonet_full
AVONET morphological and ecological trait data for 300 bird speciesavonet300
Build a phylogenetic graph representation from a treebuild_phylo_graph
Compute calibration data for probability predictionscalibration_df
Compare BM baseline and pigauto methods across replicatescompare_methods
Compute a confusion matrix for categorical or binary predictionsconfusion_matrix
k-fold cross-validation for pigauto trait imputationcross_validate
Simulated multi-observation-per-species CTmax datactmax_sim
Delhey et al. (2019) plumage lightness data for 5,809 passerine speciesdelhey5809
Evaluate a fitted pigauto model on its test setevaluate
Evaluate imputation performance against known valuesevaluate_imputation
Fit the phylogenetic baselinefit_baseline
Fit a BACE (Bayesian Augmentation using Chained Equations) baselinefit_baseline_bace
Fit a pigauto model for trait imputationfit_pigauto
Impute missing phylogenetic traits (convenience wrapper)impute
Load a saved pigauto modelload_pigauto
Split cells into train/val/test for imputation evaluationmake_missing_splits
Create an observed/missing mask matrixmask_missing
Generate M complete datasets for multiple imputationmulti_impute
Tree-aware multiple imputation (step 1 of 2)multi_impute_trees
Generate an HTML benchmark report from a pigauto fitpigauto_report
Forest-plot style comparison of benchmark resultsplot_comparison
Plot training history (ggplot2, deprecated)plot_history_gg
Plot uncertainty ribbons for imputed trait valuesplot_uncertainty
Plot a pigauto benchmarkplot.pigauto_benchmark
Plot diagnostics for a fitted pigauto modelplot.pigauto_fit
Plot predictions from a pigauto modelplot.pigauto_pred
Pool downstream model fits across multiple imputations (Rubin's rules)pool_mi
Impute missing traits using a fitted pigauto modelpredict.pigauto_fit
Preprocess trait data: align to tree, encode into latent spacepreprocess_traits
Fetch species range-centroid covariates from GBIFpull_gbif_centroids
Fetch per-species bioclim covariates from WorldClim v2.1pull_worldclim_per_species
Read trait data from a CSV file or data frameread_traits
Read a phylogenetic tree from a fileread_tree
Save a fitted pigauto modelsave_pigauto
Run a simulation benchmark for pigautosimulate_benchmark
Simulate non-BM trait data for benchmarkingsimulate_non_bm
Suggest which cell to observe next to maximise imputation precisionsuggest_next_observation
Summary method for pigauto_fit objectssummary.pigauto_fit
Pruned BirdTree phylogeny for the 5,809 species in 'delhey5809'tree_delhey
Pruned BirdTree phylogeny for the 9,993 species in 'avonet_full'tree_full
Pruned BirdTree phylogeny for the 300 species in 'avonet300'tree300
50 posterior phylogenies for the 300 species in 'avonet300'trees300
Fit a downstream model on every imputed datasetwith_imputations