Package: causact 0.5.5

causact: Fast, Easy, and Visual Bayesian Inference

Accelerate Bayesian analytics workflows in 'R' through interactive modelling, visualization, and inference. Define probabilistic graphical models using directed acyclic graphs (DAGs) as a unifying language for business stakeholders, statisticians, and programmers. This package relies on interfacing with the 'numpyro' python package.

Authors:Adam Fleischhacker [aut, cre, cph], Daniela Dapena [ctb], Rose Nguyen [ctb], Jared Sharpe [ctb]

causact_0.5.5.tar.gz
causact_0.5.5.zip(r-4.5)causact_0.5.5.zip(r-4.4)causact_0.5.5.zip(r-4.3)
causact_0.5.5.tgz(r-4.4-any)causact_0.5.5.tgz(r-4.3-any)
causact_0.5.5.tar.gz(r-4.5-noble)causact_0.5.5.tar.gz(r-4.4-noble)
causact_0.5.5.tgz(r-4.4-emscripten)causact_0.5.5.tgz(r-4.3-emscripten)
causact.pdf |causact.html
causact/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/flyaflya/causact/issues

Datasets:
  • baseballData - Dataframe of 12,145 observations of baseball games in 2010 - 2014
  • beachLocDF - Dataframe where each row represents data about one of the 26 mile markers (fake) from mile 0 to mile 2.5 along the Ocean City, MD beach/boardwalk.
  • carModelDF - Dataframe of 1000 (fake) observations of whether certain car buyers were willing to get information on a credit card speciailizing in rewards for adventure travellers.
  • chimpanzeesDF - Data from behavior trials in a captive group of chimpanzees, housed in Lousiana. From Silk et al. 2005. Nature 437:1357-1359 and further popularized in McElreath, Richard. Statistical rethinking: A Bayesian course with examples in R and Stan. CRC press, 2020. Experiment
  • corruptDF - Dataframe of 174 observations where information on the human developmet index (HDI) and the corruption perceptions index (CPI) both exist. Each observation is a country.
  • delivDF - 117,790 line items associated with 23,339 shipments.
  • gymDF - Dataframe of 44 observations of free crossfit classes data Each observation indicates how many students that participated in the free month of crossfit signed up for the monthly membership afterwards
  • houseDF - Dataframe of 1,460 observations of home sales in Ames, Iowa. Known as The Ames Housing dataset, it was compiled by Dean De Cock for use in data science education. Each observation is a home sale. See 'houseDFDescr' for more info.
  • houseDFDescr - Dataframe of 523 descriptions of data values from "The Ames Housing dataset", compiled by Dean De Cock for use in data science education. Each observation is a possible value from a variable in the 'houseDF' dataset.
  • prodLineDF - Product line and product category assignments for 12,026 partID's.
  • schoolsDF - This example, often referred to as 8-schools, was popularized by its inclusion in Bayesian Data Analysis (Gelman, Carlin, & Rubin 1997).
  • ticketsDF - Dataframe of 55,167 observations of the number of tickets written by NYC precincts each day Data modified from https://github.com/stan-dev/stancon_talks/tree/master/2018/Contributed-Talks/01_auerbach which originally sourced data from https://opendata.cityofnewyork.us/
  • totalBeachgoersRepSample - A representative sample from a random variable that represents the annual number of beach goers to Ocean City, MD beaches on hot days. Think of this representative sample as coming from either a prior or posterior distribution. An example using this sample is can be found in The Business Analyst's Guide To Business Analytics at https://www.causact.com/.

On CRAN:

bayesian-inferencedagsposterior-probabilityprobabilistic-graphical-modelsprobabilistic-programming

7.12 score 43 stars 51 scripts 744 downloads 39 exports 80 dependencies

Last updated 7 months agofrom:40ae88b694. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 25 2024
R-4.5-winOKOct 25 2024
R-4.5-linuxOKOct 25 2024
R-4.4-winOKOct 25 2024
R-4.4-macOKOct 25 2024
R-4.3-winOKOct 25 2024
R-4.3-macOKOct 25 2024

Exports:%>%addPriorGroupsbernoullibetabinomialcategoricalcauchychi_squareddag_createdag_diagrammerdag_edgedag_gretadag_mergedag_nodedag_numpyrodag_platedag_renderdagp_plotdirichletexponentialgammainstall_causact_depsinverse_gammalaplacelkj_correlationlogisticlognormalmeaningfulLabelsmultinomialmultivariate_normalnegative_binomialnormalparetopoissonrbernsetDirectedGraphThemestudentuniformweibull

Dependencies:base64encbitbit64bslibcachemclicliprcolorspacecowplotcpp11crayonDiagrammeRdigestdplyrevaluatefansifarverfastmapfontawesomeforcatsfsgenericsggplot2gluegtableherehighrhmshtmltoolshtmlwidgetsigraphisobandjquerylibjsonliteknitrlabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmimemunsellnlmepillarpkgconfigpngprettyunitsprogresspurrrR6rappdirsRColorBrewerRcppRcppTOMLreadrreticulaterlangrmarkdownrprojrootrstudioapisassscalesstringistringrtibbletidyrtidyselecttinytextzdbutf8vctrsviridisLitevisNetworkvroomwithrxfunyaml

causact: From narrative to computational insight

Rendered fromnarrative-to-insight-with-causact.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-08-08
Started: 2022-06-07

Readme and manuals

Help Manual

Help pageTopics
The magrittr pipe%>%
Group together latent parameters by prior distribution.addPriorGroups
Dataframe of 12,145 observations of baseball games in 2010 - 2014baseballData
Dataframe where each row represents data about one of the 26 mile markers (fake) from mile 0 to mile 2.5 along the Ocean City, MD beach/boardwalk.beachLocDF
Dataframe of 1000 (fake) observations of whether certain car buyers were willing to get information on a credit card speciailizing in rewards for adventure travellers.carModelDF
Check if 'r-causact' Conda environment existscheck_r_causact_env
Data from behavior trials in a captive group of chimpanzees, housed in Lousiana. From Silk et al. 2005. Nature 437:1357-1359 and further popularized in McElreath, Richard. Statistical rethinking: A Bayesian course with examples in R and Stan. CRC press, 2020. ExperimentchimpanzeesDF
Dataframe of 174 observations where information on the human developmet index (HDI) and the corruption perceptions index (CPI) both exist. Each observation is a country.corruptDF
Create a graph object for drawing a DAG.dag_create
Convert graph to Diagrammer object for visualizationdag_diagrammer
Add dimension information to 'causact_graph'dag_dim
Add edge (or edges) between nodesdag_edge
Generate a representative sample of the posterior distributiondag_greta
Merge two non-intersecting 'causact_graph' objectsdag_merge
Add a node to an existing 'causact_graph' objectdag_node
Generate a representative sample of the posterior distributiondag_numpyro
Create a plate representation for repeated nodes.dag_plate
Render the graph as an htmlwidgetdag_render
Plot posterior distribution from dataframe of posterior draws.dagp_plot
117,790 line items associated with 23,339 shipments.delivDF
probability distributionsbernoulli beta binomial categorical cauchy chi_squared dirichlet distributions exponential gamma inverse_gamma laplace lkj_correlation logistic lognormal multinomial multivariate_normal negative_binomial normal pareto poisson student uniform weibull
Dataframe of 44 observations of free crossfit classes data Each observation indicates how many students that participated in the free month of crossfit signed up for the monthly membership afterwardsgymDF
Dataframe of 1,460 observations of home sales in Ames, Iowa. Known as The Ames Housing dataset, it was compiled by Dean De Cock for use in data science education. Each observation is a home sale. See 'houseDFDescr' for more info.houseDF
Dataframe of 523 descriptions of data values from "The Ames Housing dataset", compiled by Dean De Cock for use in data science education. Each observation is a possible value from a variable in the 'houseDF' dataset.houseDFDescr
Install causact's python dependencies like numpyro, arviz, and xarray.install_causact_deps
Store meaningful parameter labelsmeaningfulLabels
Product line and product category assignments for 12,026 partID's.prodLineDF
The Bernoulli Distributionrbern
This example, often referred to as 8-schools, was popularized by its inclusion in Bayesian Data Analysis (Gelman, Carlin, & Rubin 1997).schoolsDF
Set DiagrammeR defaults for graphical modelssetDirectedGraphTheme
Dataframe of 55,167 observations of the number of tickets written by NYC precincts each day Data modified from https://github.com/stan-dev/stancon_talks/tree/master/2018/Contributed-Talks/01_auerbach which originally sourced data from https://opendata.cityofnewyork.us/ticketsDF
A representative sample from a random variable that represents the annual number of beach goers to Ocean City, MD beaches on hot days. Think of this representative sample as coming from either a prior or posterior distribution. An example using this sample is can be found in The Business Analyst's Guide To Business Analytics at https://www.causact.com/.totalBeachgoersRepSample