Package: multilevelcoda 1.3.1

multilevelcoda: Estimate Bayesian Multilevel Models for Compositional Data

Implement Bayesian Multilevel Modelling for compositional data in a multilevel framework. Compute multilevel compositional data and Isometric log ratio (ILR) at between and within-person levels, fit Bayesian multilevel models for compositional predictors and outcomes, and run post-hoc analyses such as isotemporal substitution models. References: Le, Stanford, Dumuid, and Wiley (2024) <doi:10.48550/arXiv.2405.03985>, Le, Dumuid, Stanford, and Wiley (2024) <doi:10.48550/arXiv.2411.12407>.

Authors:Flora Le [aut, cre], Joshua F. Wiley [aut]

multilevelcoda_1.3.1.tar.gz
multilevelcoda_1.3.1.zip(r-4.5)multilevelcoda_1.3.1.zip(r-4.4)multilevelcoda_1.3.1.zip(r-4.3)
multilevelcoda_1.3.1.tgz(r-4.4-any)multilevelcoda_1.3.1.tgz(r-4.3-any)
multilevelcoda_1.3.1.tar.gz(r-4.5-noble)multilevelcoda_1.3.1.tar.gz(r-4.4-noble)
multilevelcoda_1.3.1.tgz(r-4.4-emscripten)multilevelcoda_1.3.1.tgz(r-4.3-emscripten)
multilevelcoda.pdf |multilevelcoda.html
multilevelcoda/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/florale/multilevelcoda/issues

Datasets:
  • mcompd - Multilevel Compositional Data
  • psub - Possible Pairwise Substitutions
  • sbp - Sequential Binary Partition
  • sim - Multilevelcoda Simulation Study results

On CRAN:

bayesian-inferencecompositional-data-analysismultilevel-modelsmultilevelcoda

8.31 score 13 stars 120 scripts 336 downloads 23 exports 151 dependencies

Last updated 5 hours agofrom:518aeb117a. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 23 2024
R-4.5-winOKNov 23 2024
R-4.5-linuxOKNov 23 2024
R-4.4-winOKNov 23 2024
R-4.4-macOKNov 23 2024
R-4.3-winOKNov 23 2024
R-4.3-macOKNov 23 2024

Exports:brmcodabsubbsubmarginsbuild.basesubbuild.rgbuild.sbpcompilrcomplrfixefis.brmcodais.complris.substitutionmultilevelcoda_simpivot_coordpivot_coord_refitpivot_coord_rotateranefsubsubmarginssubstitutionVarCorrwsubwsubmargins

Dependencies:abindaskpassbackportsbase64encbayesmbayesplotbayestestRBHbridgesamplingbrmsBrobdingnagbslibcachemcallrcheckmateclicodacodetoolscolorspacecolourpickercommonmarkcompositionscpp11crayoncrosstalkcurldata.tabledatawizardDEoptimRdescdigestdistributionaldoFuturedplyrDTdygraphsemmeansestimabilityevaluateextrafontextrafontdbextraoperatorsfansifarverfastmapfontawesomefontBitstreamVerafontLiberationfontquiverforeachfsfuturefuture.applygdtoolsgenericsggplot2ggridgesglobalsgluegridExtragtablegtoolshighrhrbrthemeshtmltoolshtmlwidgetshttpuvhttrigraphinlineinsightisobanditeratorsjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelistenvloomagrittrmarkdownMASSMatrixmatrixStatsmemoisemgcvmimeminiUImunsellmvtnormnleqslvnlmenumDerivopensslparallellypillarpkgbuildpkgconfigplotlyplyrposteriorprocessxpromisespspurrrQuickJSRR6rappdirsRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelreshape2rlangrmarkdownrobustbaserstanrstantoolsRttf2pt1sassscalesshinyshinyjsshinystanshinythemessourcetoolsStanHeadersstringistringrsyssystemfontstensorAthreejstibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunxtablextsyamlzoo

Compositional Substitution Multilevel Analysis

Rendered fromD-substitution.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-06-09
Started: 2024-05-26

Improving MCMC Sampling for Bayesian Compositional Multilevel Models

Rendered fromE-simmodel-diag.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-11-18
Started: 2023-08-08

Introduction to Bayesian Compositional Multilevel Modelling

Rendered fromA-introduction.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-05-26
Started: 2023-07-27

Multilevel Model with Compositional Outcomes

Rendered fromC-composition-MMLM.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-05-26
Started: 2023-08-04

Multilevel Models with Compositional Predictors

Rendered fromB-composition-MLM.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-06-09
Started: 2023-08-04

Readme and manuals

Help Manual

Help pageTopics
Extract Compositional Data from 'complr' object.as.data.frame.complr as.matrix.complr
Bayes Factors from Marginal Likelihoodsbayes_factor.brmcoda
Fit Bayesian generalised (non-)linear multilevel compositional model via full Bayesian inferencebrmcoda
Between-person Simple Substitutionbsub
Between-person Average Substitutionbsubmargins
Build Base Pairwise Substitutionbuild.basesub
Reference Grid for 'substitution' model.build.rg
Build Sequential Binary Partitionbuild.sbp
Model Coefficientscoef coef.brmcoda
Indices from a (dataset of) Multilevel Composition(s) (deprecated.)compilr
Indices from a (dataset of) Multilevel Composition(s)complr
Constructor function for 'substitution' class.create_substitution
Extract Diagnostic Quantities from 'brmsfit' Models in 'brmcoda'diagnostic-quantities-brmcoda log_posterior log_posterior.brmcoda neff_ratio neff_ratio.brmcoda nuts_params nuts_params.brmcoda rhat rhat.brmcoda
Index 'brmcoda' objectsdraws-index-brmcoda nchains nchains.brmcoda ndraws ndraws.brmcoda niterations niterations.brmcoda nvariables nvariables.brmcoda variables variables.brmcoda
Expected Values of the Posterior Predictive Distributionfitted fitted.brmcoda
Population-Level Estimatesfixef fixef.brmcoda
Helper functions used only internally to estimate substitution modelget-substitution
Checks if argument is a 'brmcoda' objectis.brmcoda
Checks if argument is a 'complr' objectis.complr
Checks if argument is a 'substitution' objectis.substitution
Interface to 'shinystan'launch_shinystan launch_shinystan.brmcoda
Efficient approximate leave-one-out cross-validation (LOO)loo loo.brmcoda
MCMC Plots Implemented in 'bayesplot'mcmc_plot.brmcoda
Multilevel Compositional Datamcompd
Mean amounts and mean compositions presented in a 'complr' object.mean.complr
Extracting the Model Frame from a Formula or Fit from 'brmcoda' objectmodel.frame.brmcoda
multilevelcoda Simulation Study Resultsmultilevelcoda_sim
Extract Number of Observations from 'brmcoda' objectnobs.brmcoda
Create a matrix of output plots from a 'brmcoda''s 'brmsfit' objectpairs.brmcoda
Estimate pivot balance coordinatespivot_coord
Estimate pivot balance coordinates by refitting model.pivot_coord_refit
Estimate pivot balance coordinates by rotating sequential binary partition.pivot_coord_rotate
Trace and Density Plots for MCMC Draws plotplot.brmcoda
Substitution Plotplot.substitution
Posterior Predictive Checks for 'brmcoda' Objectspp_check pp_check.brmcoda
Draws from the Posterior Predictive Distributionpredict predict.brmcoda
Print a Summary for a fitted 'brmsfit' model in a 'brmcoda' objectprint.brmcoda
Print a Summary for a 'complr' objectprint.complr
Print a Summary for a 'substitution' objectprint.substitution
Summary for a 'complr' objectprint.summary.complr
Extract Priors of a 'brmsfit' from a 'brmcoda' objectprior_summary.brmcoda
Possible Pairwise Substitutionspsub
Group-Level Estimatesranef ranef.brmcoda
Posterior Draws of Residuals/Predictive Errorsresiduals.brmcoda
Sequential Binary Partitionsbp
multilevelcoda Simulation Study resultssim
Simple Substitutionsub
Average Substitutionsubmargins
Multilevel Compositional Substitution Analysissubstitution
Create a Summary of a fitted 'brmsfit' model in a 'brmcoda' objectsummary.brmcoda
Create a Summary of a 'complr' objectsummary.complr
Create a Summary of a fitted 'brmsfit' model from a 'pivot_coord' objectsummary.pivot_coord
Create a Summary of a Substitution Model represented by a 'substitution' objectsummary.substitution
Update 'brmcoda' modelsupdate.brmcoda
Update 'complr'update.complr
Variance of compositions presented in a 'complr' object.var.complr
Extract Variance and Correlation ComponentsVarCorr VarCorr.brmcoda
Covariance and Correlation Matrix of Population-Level Effectsvcov.brmcoda
Within-person Simple Substitutionwsub
Within-person Average Substitutionwsubmargins