Package: phyr 1.3.0

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.3.0.tar.gz
phyr_1.3.0.zip(r-4.7-x86_64)phyr_1.3.0.zip(r-4.7-arm64)phyr_1.3.0.zip(r-4.6-x86_64)phyr_1.3.0.zip(r-4.6-arm64)phyr_1.3.0.zip(r-4.5-x86_64)
phyr_1.3.0.tgz(r-4.6-x86_64)phyr_1.3.0.tgz(r-4.6-arm64)phyr_1.3.0.tgz(r-4.5-x86_64)phyr_1.3.0.tgz(r-4.5-arm64)
phyr_1.3.0.tar.gz(r-4.7-arm64)phyr_1.3.0.tar.gz(r-4.7-x86_64)phyr_1.3.0.tar.gz(r-4.6-arm64)phyr_1.3.0.tar.gz(r-4.6-x86_64)
phyr_1.3.0.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

8.69 score 36 stars 3 packages 6.7k downloads 38 exports 45 dependencies

Last updated from:0547d756ca. Checks:3 ERROR, 12 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR317
linux-devel-x86_64OK348
source / vignettesOK438
linux-release-arm64OK285
linux-release-x86_64OK344
macos-release-arm64OK293
macos-release-x86_64OK537
macos-oldrel-arm64OK263
macos-oldrel-x86_64OK513
windows-devel-arm64ERROR402
windows-devel-x86_64OK292
windows-release-arm64ERROR407
windows-release-x86_64OK284
windows-oldrel-x86_64OK359
wasm-releaseOK213

Exports:%nin%align_comm_Vboot_cicommunityPGLMMcommunityPGLMM.matrix.structurecommunityPGLMM.plot.recommunityPGLMM.predicted.valuescommunityPGLMM.profile.LRTcommunityPGLMM.show.recor_phylofixefget_design_matrixmatch_comm_treepcdpcd_predpglmmpglmm_comparepglmm_iVpglmm_matrix_structurepglmm_plot_ranefpglmm_plot_repglmm_predicted_valuespglmm_profile_LRTplot_bayesplot_dataprep_dat_pglmmpscpsdpsepsrpsvpsv.sppranefrefit_bootsrm_site_noobsrm_sp_noobsVarCorrvcv2

Dependencies:apebootclicpp11deldirdigestdplyrgenericsgluegridExtragtableinterpjpeglatticelatticeExtralifecyclelme4magrittrMASSMatrixminqamvtnormnlmenloptrpillarpkgconfigpngpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangstringistringrtibbletidyrtidyselectutf8vctrswithr

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-11-17
Started: 2019-09-27

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

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
Log-likelihood of a communityPGLMM ModellogLik.communityPGLMM
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 predict.pglmm_compare
Inverse of the covariance matrix of a fitted PGLMMpglmm_iV
'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 group-level estimates of random effectsprint.ranef.pglmm random.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
Extract variances of random termsVarCorr VarCorr.communityPGLMM
Create phylogenetic var-cov matrixvcv2