Main Model Functions

Main interface for fitting models and returning model objects

pibble() refit(<pibblefit>)

Interface to fit pibble models

basset() refit(<bassetfit>)

Interface to fit basset models

orthus()

Interface to fit orthus models

maltipoo()

Interface to fit maltipoo models

Rcpp Model Interfaces

Low level interfaces for fitting models

optimPibbleCollapsed()

Function to Optimize the Collapsed Pibble Model

optimMaltipooCollapsed()

Function to Optimize the Collapsed Maltipoo Model

conjugateLinearModel()

Solve Bayesian Multivariate Conjugate Linear Model

uncollapsePibble()

Uncollapse output from optimPibbleCollapsed to full pibble Model

loglikPibbleCollapsed() gradPibbleCollapsed() hessPibbleCollapsed()

Calculations for the Collapsed Pibble Model

loglikMaltipooCollapsed() gradMaltipooCollapsed() hessMaltipooCollapsed()

Calculations for the Collapsed Maltipoo Model

SE() LINEAR()

Multivariate RBF Kernel

Object Methods

Methods for working with model objects

ncategories() nsamples() ncovariates() niter()

Generic method for accessing model fit dimensions

as.list(<orthusfit>)

Convert object of class orthusfit to a list

as.list(<pibblefit>)

Convert object of class pibblefit to a list

as.list()

Generic method to convert to list

as.orthusfit()

convert list to orthusfit

as.pibblefit()

convert list to pibblefit

coef(<orthusfit>)

Return regression coefficients of orthus object

coef(<pibblefit>)

Return regression coefficients of pibblefit object

coef()

Return regression coefficients of pibblefit or orthusfit object

maltipoofit()

Create maltipoofit object

name(<orthusfit>)

S3 for orthusfit apply names to orthusfit object

name(<pibblefit>)

S3 for pibblefit apply names to pibblefit object

name()

Generic method for applying names to an object

names_covariates() names_samples() names_categories() names_coords() `names_covariates<-`() `names_samples<-`() `names_categories<-`()

Generic method for getting and setting dimension names of fit object

refit()

Generic method for fitting model from passed model fit object

orthusfit()

Create orthusfit object

pibblefit()

Create pibblefit object

ppc()

Generic method for visualizing posterior predictive checks

ppc(<pibblefit>)

Visualization of Posterior Predictive Check of fit model

ppc_summary()

Generic Method to Plot Posterior Predictive Summaries

predict(<bassetfit>)

Predict using basset

predict(<pibblefit>)

Predict response from new data

predict()

Predict response from new data

plot(<pibblefit>)

Plot Summaries of Posterior Distribution of pibblefit Parameters

print()

Print dimensions and coordinate system information for an orthusfit or pibblefit object.

print(<pibblefit>)

Print dimensions and coordinate system information for pibblefit object.

print(<orthusfit>)

Print dimensions and coordinate system information for orthusfit object.

sample_prior(<pibblefit>)

Sample from the prior distribution of pibblefit object

sample_prior()

Generic method for sampling from prior distribution of object

to_proportions() to_alr() to_ilr() to_clr()

Transform Fit fido Parameters to other representations

req(<maltipoofit>)

require elements to be non-null in pibblefit or throw error

req(<orthusfit>)

require elements to be non-null in orthusfit or throw error

req(<pibblefit>)

require elements to be non-null in pibblefit or throw error

req()

Generic method for ensuring object contains required elements

summary()

Summarise pibblefit or orthusfit object and print posterior quantiles

summary(<pibblefit>)

Summarise pibblefit object and print posterior quantiles

summary(<orthusfit>)

Summarise orthusfit object and print posterior quantiles

verify(<bassetfit>)

Simple verification of passed bassetfit object

verify(<maltipoofit>)

Simple verification of passed multipoo object

verify(<orthusfit>)

Simple verification of passed orthusfit object

verify(<pibblefit>)

Simple verification of passed pibblefit object

verify()

Generic method for verifying new objects

Helpful Utility Methods

Just that, mostly support other package functions

alr()

Compute the ALR of a matrix

alrInv()

Compute the inverse ALR of a matrix

alrInv_array()

Compute the ALR of an array

alr_array()

Compute the ALR of an array

check_dims()

Check vector/matrix/data.frame for expected dimensions or throw error

clr_array()

Compute the CLR of an array

create_default_ilr_base()

Create a default ILR base

gather_array()

Gather Multidimensional Array to Tidy Tibble

lambda_to_iqlr()

Transform Lambda into IQLR (Inter-Quantile Log-Ratio)

miniclo()

Closure operator

miniclo_array()

Closure Operation applied to array on margin

orthus_sim()

Simulate simple orthus dataset and priors (for testing)

orthus_tidy_samples()

Convert orthus samples of Eta Lambda and Sigma to tidy format

pibble_sim()

Simulate simple pibble dataset and priors (for testing)

pibble_tidy_samples()

Convert pibble samples of Eta Lambda and Sigma to tidy format

random_pibble_init()

Provide random initialization for pibble model

store_coord() reapply_coord()

Holds information on coordinates system to later be reapplied

summarise_posterior()

Shortcut for summarize variable with quantiles and mean

Utility Math Functions

Fast, C++, mostly for internal use

oilrvar2ilrvar() oilrvar2clrvar() oclrvar2ilrvar() oalrvar2clrvar() oclrvar2alrvar() oalrvar2alrvar() oalrvar2ilrvar() oilrvar2alrvar()

Convert orthus covariance matricies between representations

lmvgamma()

Log of Multivarate Gamma Function - Gamma_p(a)

lmvgamma_deriv()

Derivative of Log of Multivariate Gamma Function - Gamma_p(a)

oglr() oglrInv() oalr() oalrInv() oilr() oilrInv() oclr() oclrInv()

Log-Ratio transforms for orthus objects

Datasets

Example Datasets

mallard

Data from Silverman et al. (2018) Microbiome

mallard_family

Data from Silverman et al. (2018) Microbiome

metadata

Data from Silverman et al. (2019) bioRxiv

pcrbias_mock

Data from Silverman et al. (2019) bioRxiv