Package: phyr 1.2.1

phyr: Model Based Phylogenetic Analysis

A collection of functions to do model-based phylogenetic analysis. It includes functions to calculate community phylogenetic diversity, to estimate correlations among functional traits while accounting for phylogenetic relationships, and to fit phylogenetic generalized linear mixed models. The Bayesian phylogenetic generalized linear mixed models are fitted with the 'INLA' package (<https://www.r-inla.org>).

Authors:Anthony Ives [aut], Russell Dinnage [aut], Lucas A. Nell [aut], Matthew Helmus [aut], Daijiang Li [aut, cre]

phyr_1.2.1.tar.gz
phyr_1.2.1.zip(r-4.7)phyr_1.2.1.zip(r-4.6)phyr_1.2.1.zip(r-4.5)
phyr_1.2.1.tgz(r-4.6-x86_64)phyr_1.2.1.tgz(r-4.6-arm64)phyr_1.2.1.tgz(r-4.5-x86_64)phyr_1.2.1.tgz(r-4.5-arm64)
phyr_1.2.1.tar.gz(r-4.7-arm64)phyr_1.2.1.tar.gz(r-4.7-x86_64)phyr_1.2.1.tar.gz(r-4.6-arm64)phyr_1.2.1.tar.gz(r-4.6-x86_64)
phyr_1.2.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
phyr/json (API)

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

Bug tracker:https://github.com/daijiang/phyr/issues

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

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • comm_a - Example community data
  • comm_b - Example community data
  • envi - Example environmental data
  • oldfield - Phylogeny and community data from an Oldfield ecosystem in Southern Ontario, Canada
  • phylotree - Example phylogeny
  • traits - Example species traits data

On CRAN:

Conda:

bayesianglmminlaphylogenyspecies-distribution-modelingopenblascpp

10.03 score 36 stars 2 packages 129 scripts 13k downloads 36 exports 45 dependencies

Last updated from:b34dc3a367. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK334
linux-devel-x86_64OK292
source / vignettesOK411
linux-release-arm64OK337
linux-release-x86_64OK292
macos-release-arm64OK201
macos-release-x86_64OK341
macos-oldrel-arm64OK217
macos-oldrel-x86_64OK432
windows-develOK992
windows-releaseOK1114
windows-oldrelOK235
wasm-releaseOK182

Exports:%nin%align_comm_Vboot_cicommunityPGLMMcommunityPGLMM.matrix.structurecommunityPGLMM.plot.recommunityPGLMM.predicted.valuescommunityPGLMM.profile.LRTcommunityPGLMM.show.recor_phylofixefget_design_matrixmatch_comm_treepcdpcd_predpglmmpglmm_comparepglmm_matrix_structurepglmm_plot_ranefpglmm_plot_repglmm_predicted_valuespglmm_profile_LRTplot_bayesplot_dataprep_dat_pglmmpscpsdpsepsrpsvpsv.sppranefrefit_bootsrm_site_noobsrm_sp_noobsvcv2

Dependencies:apebootclicpp11deldirdigestdplyrgenericsgluegridExtragtableinterpjpeglatticelatticeExtralifecyclelme4magrittrMASSMatrixminqamvtnormnlmenloptrpillarpkgconfigpngpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangstringistringrtibbletidyrtidyselectutf8vctrswithr

Performance benchmark
Benchmark for PSV family functions | psv | pse | pcd | Benchmark for community PGLMM (pglmm) | Benchmark for cor_phylo()

Last update: 2026-04-30
Started: 2019-09-27

Usage of pglmm()
Fit a binomial model with success and failures | Prepare random terms for complex models that cannot be set up with formula | Other functions to work with models fitted with pglmm()

Last update: 2026-04-30
Started: 2019-09-27

Plot random terms of communityPGLMM
Main function | Simulate data | Var-cov matrices of random terms | Plot var-cov matrices of all random terms in one figure | Individual plots for var-cov matrices | Simulated site by species matrix for random terms | Plot simulated matrices of all random terms in one figure | Individual plots for simulated site by species matrix | Fitted model as input

Last update: 2019-12-20
Started: 2018-04-06

Readme and manuals

Help Manual

Help pageTopics
Not in%nin%
Create phylogenetic var-cov matrix based on phylogeny and community dataalign_comm_V
Generic method to output bootstrap confidence intervals from an object.boot_ci
Example community datacomm_a
Example community datacomm_b
Correlations among multiple variates with phylogenetic signalboot_ci.cor_phylo cor_phylo print.cor_phylo
Example environmental dataenvi
Family Objects for communityPGLMM objectsfamily.communityPGLMM
Fitted values for communityPGLMMfitted.communityPGLMM
Extract fixed-effects estimatesfixed.effects fixef fixef.communityPGLMM
'get_design_matrix' gets design matrix for gaussian, binomial, and poisson modelsget_design_matrix
Match phylogeny with community datamatch_comm_tree
Extracting the Model Frame from a communityPGLMM Model objectmodel.frame.communityPGLMM
Number of Observation in a communityPGLMM Modelnobs.communityPGLMM
Phylogeny and community data from an Oldfield ecosystem in Southern Ontario, Canadaoldfield
pairwise site phylogenetic community dissimilarity (PCD) within a communitypcd
Predicted PCD with species poolpcd_pred
Phylogenetic Generalized Linear Mixed Model for Community DatacommunityPGLMM pglmm
Phylogenetic Generalized Linear Mixed Model for Comparative Datapglmm_compare
'pglmm_matrix_structure' produces the entire covariance matrix structure (V) when you specify random effects.communityPGLMM.matrix.structure pglmm_matrix_structure
Visualize random terms of communityPGLMMscommunityPGLMM.plot.re communityPGLMM.show.re pglmm_plot_ranef pglmm_plot_re
Predicted values of PGLMMcommunityPGLMM.predicted.values pglmm_predicted_values
Testing statistical significance of random effectcommunityPGLMM.profile.LRT pglmm_profile_LRT
Example phylogenyphylotree
plot_bayes genericplot_bayes
Plot the original dataset and predicted values (optional)plot_bayes.communityPGLMM plot_data
Predict Function for communityPGLMM Model Objectspredict.communityPGLMM
Prepare data for 'pglmm'prep_dat_pglmm
Print summary information of fitted modelprint.communityPGLMM
Print summary information of fitted modelprint.pglmm_compare
Phylogenetic Species Diversity Metricspsc psd pse psr psv psv.spp
Extract random-effects estimatesrandom.effects ranef ranef.communityPGLMM
Refit bootstrap replicates that failed to converge in a call to 'cor_phylo'print.cp_refits refit_boots
Residuals of communityPGLMM objectsresiduals.communityPGLMM
Remove site that has no observations of any speciesrm_site_noobs
Remove species that not observed in any siterm_sp_noobs
Simulate from a communityPGLMM objectsimulate.communityPGLMM
Summary information of fitted modelsummary.communityPGLMM
Summary information of fitted pglmm_compare modelsummary.pglmm_compare
Example species traits datatraits
Create phylogenetic var-cov matrixvcv2