Learn R Programming

⚠️There's a newer version (0.1.4) of this package.Take me there.

bbricks (version 0.1.1)

Bayesian Methods and Graphical Model Structures for Statistical Modeling

Description

A class of frequently used Bayesian parametric and nonparametric model structures, as well as a set of tools for common analytical tasks. Structures include Gaussian and Normal-Inverse-Wishart conjugate structure, Gaussian and Normal-Inverse-Gamma conjugate structure, Categorical and Dirichlet conjugate structure, Dirichlet Process on positive integers, Dirichlet Process in general, Hierarchical Dirichlet Process ... Tasks include updating posteriors, calculating marginal likelihood, calculating posterior predictive densities, sampling from posterior predictive distributions, calculating "Maximum A Posteriori" (MAP) estimates ... See Murphy (2012, ), Koller and Friedman (2009, ) and Andrieu, de Freitas, Doucet and Jordan (2003, ) for more information. See to get started.

Copy Link

Version

Install

install.packages('bbricks')

Monthly Downloads

28

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Haotian Chen

Last Published

March 25th, 2020

Functions in bbricks (0.1.1)

MAP.CatDP

Maximum A Posteriori(MAP) estimate of a "CatDP" object
dPosteriorPredictive.CatHDP

Posterior predictive density function of a "CatHDP" object
MAP.CatDirichlet

MAP estimate of a "CatDirichlet" object
dPosteriorPredictive.CatHDP2

Posterior predictive density function of a "CatHDP" object
farmadsData

farm ads data
MetropolisHastings

Metropolis-Hastings sampler
MPE.CatDirichlet

MPE of a "CatDirichlet" object
CatHDP

Create objects of type "CatHDP".
MPE.GaussianNIG

MPE estimate of a "GaussianNIG" object
MAP

Get the Maximum A Posteriori(MAP) estimate of a "BayesianBrick" object
MAP.GaussianNIG

MAP estimate of a "GaussianNIG" object
dPosteriorPredictive.CatDP

Posterior predictive density function of a "CatDP" object
MAP.GaussianNIW

Maximum A Posteriori(MAP) estimate of a "GaussianNIW" object
bbricks-package

bbricks: Bayesian Methods and Graphical Model Structures for Statistical Modeling
MPE.GaussianNIW

Mean Posterior Estimate(MPE) of a "GaussianNIW" object
marginalLikelihood.HDP2

Marginallikelihood for HDP2
marginalLikelihood.DP

Marginallikelihood for Dirichlet Process(DP)
marginalLikelihood.GaussianNIG

Marginal likelihood of a "GaussianNIG" object
%plus%

a plus b with NA values
MPE.CatDP

Mean Posterior Estimate(MPE) of a "CatDP" object
posteriorDiscard.CatHDP2

Update a "CatHDP2" object with sample sufficient statistics
posteriorDiscard.DP

Update a "DP" object with sample sufficient statistics
marginalLikelihood

Get the marginal likelihood of a "BayesianBrick" object
posterior.HDP2

Update a "HDP2" object with sample sufficient statistics
posterior.HDP

Update a "HDP" object with sample sufficient statistics
dPosteriorPredictive.HDP2

Posterior predictive density function of a "HDP2" object
dDir

Density function for Dirichelt distribution
dPosteriorPredictive.GaussianNIW

Posterior predictive density function of a "GaussianNIW" object
marginalLikelihood_bySufficientStatistics.CatDP

Marginal likelihood of a "CatDP" object, usnig sufficient statistics
dPosteriorPredictive.HDP

Posterior predictive density function of a "HDP" object
MPE

Get the Mean Posterior Estimate(MPE) of a "BayesianBrick" object
dGaussian

Density function of Gaussian distribution
logsumexp

log sum exp
posteriorDiscard_bySufficientStatistics.CatDirichlet

Update the prior Dirichlet distribution with sample sufficient statistics
lrData

Samples from a simple linear model
marginalLikelihood_bySufficientStatistics.CatDirichlet

Marginal likelihood of a "CatDirichlet" object, usnig sufficient statistics
dPosteriorPredictive.DP

Posterior predictive density function of a Dirichlet Process object
dCategorical

Probability mass function for Categorical distribution
posteriorDiscard_bySufficientStatistics

update the prior distribution with sufficient statistics
cancerData

Cancer mortality of 20 cities
rDir

Random generation for Dirichelt distribution
.is

a internal version of "is", only for this package
dT

Density function for (multivariate) t distribution
dPosteriorPredictive.CatDirichlet

Posterior predictive density function of a "CatDirichlet" object
linearGaussian

Linear Gaussian systems
posterior.CatHDP

Update a "CatHDP" object with sample sufficient statistics
posterior.CatDirichlet

Update a "CatDirichlet" object with sample sufficient statistics
inferenceJointGaussian

Inference in joint Gaussian distribution
posteriorDiscard.GaussianNIG

Update a "GaussianNIG" object with sample sufficient statistics
rGaussian

Random generation for Gaussian distribution
marginalLikelihood_bySufficientStatistics

Get the marginal likelihood of a "BayesianBrick" object
posteriorDiscard.GaussianNIW

Update a "GaussianNIW" object with sample sufficient statistics
rPosteriorPredictive.HDP2

Posterior predictive random generation of a "HDP2" object
rPosteriorPredictive

Generate random samples from the posterior predictive distribution
sufficientStatistics.DP

Sufficient statistics of a "DP" object
dPosteriorPredictive

Get the density value of the posterior predictive distribution
posterior.GaussianNIG

Update a "GaussianNIG" object with sample sufficient statistics
mmData

Samples from a mixture model
posterior.GaussianNIW

Update a "GaussianNIW" object with sample sufficient statistics
posteriorDiscard.CatDP

Update a "CatDP" object with sample sufficient statistics
posterior

update the prior distribution with sufficient statistics
print.BasicBayesian

Print the content of an BasicBasyesian object
posterior_bySufficientStatistics

update the prior distribution with sufficient statistics
sufficientStatistics.GaussianNIG

Sufficient statistics of a "GaussianNIG" object
dPosteriorPredictive.GaussianNIG

Posterior predictive density function of a "GaussianNIG" object
rPosteriorPredictive.CatDP

Posterior predictive random generation of a "CatDP" object
rPosteriorPredictive.CatDirichlet

Posterior predictive random generation of a "CatDirichlet" object
rPosteriorPredictive.DP

Posterior predictive random generation of a "DP" object
marginalLikelihood.HDP

Marginallikelihood for HDP
posterior_bySufficientStatistics.CatDP

Update a "CatDP" object with sample sufficient statistics
marginalLikelihood.GaussianNIW

Marginal likelihood of a "GaussianNIW" object
sufficientStatistics_Weighted.HDP2

Weighted sufficient statistics of a "HDP2" object
posterior_bySufficientStatistics.CatDirichlet

Update a "CatDirichlet" object with sample sufficient statistics
rPosteriorPredictive.CatHDP2

Posterior predictive random generation of a "CatHDP2" object
rPosteriorPredictive.CatHDP

Posterior predictive random generation of a "CatHDP" object
sufficientStatistics.CatDP

Sufficient statistics of a "CatDP" object
marginalLikelihood_bySufficientStatistics.GaussianNIG

Marginal likelihood of a "GaussianNIG" object, usnig sufficient statistics
rPosteriorPredictive.GaussianNIG

Posterior predictive random generation of a "GaussianNIG" object
marginalLikelihood_bySufficientStatistics.GaussianNIW

Marginal likelihood of a "GaussianNIW" object, usnig sufficient statistics
posterior.CatHDP2

Update a "CatHDP2" object with sample sufficient statistics
sufficientStatistics_Weighted

Get weighted sample sufficient statistics
marginalLikelihood.CatDP

Marginal likelihood of a "CatDP" object
mmhhData

Samples from a hierarchical mixture model with two layers of hierarchies
pdsInverse

Inverse of a positive definite symmetric matrix
marginalLikelihood.CatDirichlet

Marginal likelihood of a "CatDirichlet" object
sufficientStatistics.GaussianNIW

Sufficient statistics of a "GaussianNIW" object
sufficientStatistics.HDP

Sufficient statistics of a "HDP" object
mmhData

Samples from a hierarchical mixture model
posterior.DP

Update a "DP" object with sample sufficient statistics
sufficientStatistics_Weighted.CatDP

Weighted sufficient statistics of a "CatDP" object
sufficientStatistics_Weighted.CatDirichlet

Weighted sufficient statistics of a "CatDirichlet" object
sufficientStatistics.CatDirichlet

Sufficient statistics of a "CatDirichlet" object
posteriorDiscard.CatDirichlet

Update a "CatDirichlet" object with sample sufficient statistics
posterior.CatDP

Update a "CatDP" object with sample sufficient statistics
posteriorDiscard.HDP

Update a "HDP" object with sample sufficient statistics
posteriorDiscard.CatHDP

Update a "CatHDP" object with sample sufficient statistics
posteriorDiscard.HDP2

Update a "HDP2" object with sample sufficient statistics
rCategorical

Random generation for Categorical distribution
print.HDP2

print the content of a "HDP2" object
print.CatHDP2

Print the content of an CatHDP2 object
print.CatHDP

Print the content of an CatHDP object
posteriorDiscard

update the prior distribution with sufficient statistics
release_questions

additional release questions
sufficientStatistics.HDP2

Sufficient statistics of a "HDP2" object
rT

Random Generation for (multivariate) t distribution
sufficientStatistics

Get sample sufficient statistics
posteriorDiscard_bySufficientStatistics.CatDP

Update a "CatDP" object with sample sufficient statistics
print.DP

print the content of a "DP" object
rPosteriorPredictive.HDP

Posterior predictive random generation of a "HDP" object
print.HDP

print the content of a "HDP" object
sufficientStatistics_Weighted.DP

Weighted sufficient statistics of a "DP" object
rPosteriorPredictive.GaussianNIW

Posterior predictive random generation of a "GaussianNIW" object
sufficientStatistics_Weighted.GaussianNIG

Weighted sufficient statistics of a "GaussianNIG" object
sufficientStatistics_Weighted.GaussianNIW

Weighted sufficient statistics for a "GaussianNIW" object
sufficientStatistics_Weighted.HDP

Weighted sufficient statistics of a "HDP" object
HDP

Create objects of type "HDP".
HDP2

Create objects of type "HDP2".
CatDirichlet

Create objects of type "CatDirichlet".
BasicBayesian

Create objects of type '"BasicBayesian"'.
CatDP

Create objects of type "CatDP".
GaussianNIG

Create objects of type "GaussianNIG".
GaussianNIW

Create objects of type "GaussianNIW".
CatHDP2

Create objects of type "CatHDP2".
DP

Create objects of type "DP".