Skip to contents

Model functions

Functions for fitting the main models

pibble() refit(<pibblefit>)
Interface to fit pibble models
refit()
Generic method for fitting model from passed model fit object
basset() refit(<bassetfit>)
Interface to fit basset models
orthus()
Interface to fit orthus models

Model checking

plot(<pibblefit>)
Plot Summaries of Posterior Distribution of pibblefit Parameters
ppc(<pibblefit>)
Visualization of Posterior Predictive Check of fit model
ppc()
Generic method for visualizing posterior predictive checks
ppc_summary()
Generic Method to Plot Posterior Predictive Summaries

Useful functions for determining model fit

plot(<pibblefit>)
Plot Summaries of Posterior Distribution of pibblefit Parameters
ppc(<pibblefit>)
Visualization of Posterior Predictive Check of fit model
ppc()
Generic method for visualizing posterior predictive checks
ppc_summary()
Generic Method to Plot Posterior Predictive Summaries
r2()
Generic Method to Calculate R2 for Fitted Model
sample_prior(<pibblefit>)
Sample from the prior distribution of pibblefit object
sample_prior()
Generic method for sampling from prior distribution of object
summarise_posterior()
Shortcut for summarize variable with quantiles and mean

Transformation functions

to_proportions() to_alr() to_ilr() to_clr()
Transform Fit fido Parameters to other representations

Helper 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
as.list(<orthusfit>)
Convert object of class orthusfit to a list
as.list(<pibblefit>)
Convert object of class pibblefit to a list
as.orthusfit()
convert list to orthusfit
as.pibblefit()
convert list to pibblefit
check_dims()
Check vector/matrix/data.frame for expected dimensions or throw error
clr_array()
Compute the CLR of an array
coef(<orthusfit>)
Return regression coefficients of orthus object
coef(<pibblefit>)
Return regression coefficients of pibblefit object
conjugateLinearModel()
Solve Bayesian Multivariate Conjugate Linear Model
oilrvar2ilrvar() oilrvar2clrvar() oclrvar2ilrvar() oalrvar2clrvar() oclrvar2alrvar() oalrvar2alrvar() oalrvar2ilrvar() oilrvar2alrvar()
Convert orthus covariance matricies between representations
create_default_ilr_base()
Create a default ILR base
gather_array()
Gather Multidimensional Array to Tidy Tibble
SE() LINEAR()
Multivariate RBF Kernel
lambda_to_iqlr()
Transform Lambda into IQLR (Inter-Quantile Log-Ratio)
loglikPibbleCollapsed() gradPibbleCollapsed() hessPibbleCollapsed()
Calculations for the Collapsed Pibble Model
lmvgamma()
Log of Multivarate Gamma Function - Gamma_p(a)
lmvgamma_deriv()
Derivative of Log of Multivariate Gamma Function - Gamma_p(a)
miniclo()
Closure operator
miniclo_array()
Closure Operation applied to array on margin
mongrel()
mongrel
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
ncategories() nsamples() ncovariates() niter()
Generic method for accessing model fit dimensions
optimPibbleCollapsed()
Function to Optimize the Collapsed Pibble Model
orthusfit()
Create orthusfit object
oglr() oglrInv() oalr() oalrInv() oilr() oilrInv() oclr() oclrInv()
Log-Ratio transforms for orthus objects
orthus_tidy_samples()
Convert orthus samples of Eta Lambda and Sigma to tidy format
pibblefit()
Create pibblefit object
predict(<bassetfit>)
Predict using basset
predict(<pibblefit>)
Predict response from new data
print(<orthusfit>)
Print dimensions and coordinate system information for orthusfit object.
print(<pibblefit>)
Print dimensions and coordinate system information for pibblefit object.
pibble_tidy_samples()
Convert pibble samples of Eta Lambda and Sigma to tidy format
random_pibble_init()
Provide random initialization for pibble model
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
store_coord() reapply_coord()
Holds information on coordinates system to later be reapplied
summary(<orthusfit>)
Summarise orthusfit object and print posterior quantiles
summary(<pibblefit>)
Summarise pibblefit object and print posterior quantiles
uncollapsePibble()
Uncollapse output from optimPibbleCollapsed to full pibble Model
uncollapsePibble_sigmaKnown()
Uncollapse output from optimPibbleCollapsed to full pibble Model when Sigma is known
verify(<bassetfit>)
Simple verification of passed bassetfit object
verify(<orthusfit>)
Simple verification of passed orthusfit object
verify(<pibblefit>)
Simple verification of passed pibblefit object
verify()
Generic method for verifying new objects

Data sets and data simulators

fido fido-package fido_package
fido: Fitting and Analysis of Multinomial Logistic Normal Models
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
orthus_sim()
Simulate simple orthus dataset and priors (for testing)
pcrbias_mock
Data from Silverman et al. (2019) bioRxiv
pibble_sim()
Simulate simple pibble dataset and priors (for testing)
Y
Data from Silverman et al. (2019) bioRxiv