Phylogenetic Diversity

Functions to calculate alpha and beta phylogenetic diversity

psv() psr() pse() psc() psv.spp() psd()

Phylogenetic Species Diversity Metrics

pcd()

pairwise site phylogenetic community dissimilarity (PCD) within a community

pcd_pred()

Predicted PCD with species pool

Phylogenetic Correlations

Functions to calculate correlations while accounting for phylogenetic relationships.

cor_phylo() boot_ci(<cor_phylo>) print(<cor_phylo>)

Correlations among multiple variates with phylogenetic signal

boot_ci()

Generic method to output bootstrap confidence intervals from an object.

refit_boots() print(<cp_refits>)

Refit bootstrap replicates that failed to converge in a call to cor_phylo

Phylogenetic Generalized Linear Mixed Models

Functions to fit PGLMMs.

pglmm_matrix_structure() communityPGLMM.matrix.structure()

pglmm_matrix_structure produces the entire covariance matrix structure (V) when you specify random effects.

pglmm_plot_ranef() communityPGLMM.show.re() pglmm_plot_re() communityPGLMM.plot.re()

Visualize random terms of communityPGLMMs

pglmm_predicted_values() communityPGLMM.predicted.values()

Predicted values of PGLMM

pglmm_profile_LRT() communityPGLMM.profile.LRT()

Testing statistical significance of random effect

pglmm() communityPGLMM()

Phylogenetic Generalized Linear Mixed Model for Community Data

pglmm_compare()

Phylogenetic Generalized Linear Mixed Model for Comparative Data

prep_dat_pglmm()

Prepare data for pglmm

print(<pglmm_compare>)

Print summary information of fitted model

summary(<pglmm_compare>)

Summary information of fitted pglmm_compare model

family(<communityPGLMM>)

Family Objects for communityPGLMM objects

fitted(<communityPGLMM>)

Fitted values for communityPGLMM

fixef(<communityPGLMM>)

Extract fixed-effects estimates

model.frame(<communityPGLMM>)

Extracting the Model Frame from a communityPGLMM Model object

nobs(<communityPGLMM>)

Number of Observation in a communityPGLMM Model

plot_data() plot_bayes(<communityPGLMM>)

Plot the original dataset and predicted values (optional)

predict(<communityPGLMM>)

Predict Function for communityPGLMM Model Objects

print(<communityPGLMM>)

Print summary information of fitted model

ranef(<communityPGLMM>)

Extract random-effects estimates

residuals(<communityPGLMM>)

Residuals of communityPGLMM objects

simulate(<communityPGLMM>)

Simulate from a communityPGLMM object

summary(<communityPGLMM>)

Summary information of fitted model

get_design_matrix()

get_design_matrix gets design matrix for gaussian, binomial, and poisson models

plot_bayes()

plot_bayes generic

Helper Functions

Functions to help with data processing.

vcv2()

Create phylogenetic var-cov matrix

rm_site_noobs()

Remove site that has no observations of any species

rm_sp_noobs()

Remove species that not observed in any site

`%nin%`

Not in

align_comm_V()

Create phylogenetic var-cov matrix based on phylogeny and community data

match_comm_tree()

Match phylogeny with community data

Data Sets

Examplary data sets used in the package

comm_a

Example community data

comm_b

Example community data

traits

Example species traits data

phylotree

Example phylogeny

envi

Example environmental data

oldfield

Phylogeny and community data from an Oldfield ecosystem in Southern Ontario, Canada