MyNixOS website logo
Description

Staged Event Trees.

Creates and fits staged event tree probability models, which are probabilistic graphical models capable of representing asymmetric conditional independence statements for categorical variables. Includes functions to create, plot and fit staged event trees from data, as well as many efficient structure learning algorithms. References: Carli F, Leonelli M, Riccomagno E, Varando G (2022). <doi: 10.18637/jss.v102.i06>. Collazo R. A., Görgen C. and Smith J. Q. (2018, ISBN:9781498729604). Görgen C., Bigatti A., Riccomagno E. and Smith J. Q. (2018) <arXiv:1705.09457>. Thwaites P. A., Smith, J. Q. (2017) <arXiv:1510.00186>. Barclay L. M., Hutton J. L. and Smith J. Q. (2013) <doi:10.1016/j.ijar.2013.05.006>. Smith J. Q. and Anderson P. E. (2008) <doi:10.1016/j.artint.2007.05.004>.

stagedtrees

stagedtrees R-CMD-check codecov

Citation

To cite stagedtrees in publications use:

Carli F, Leonelli M, Riccomagno E, Varando G (2022). “The R Package stagedtrees for Structural Learning of Stratified Staged Trees.” Journal of Statistical Software, 102(6), 1-30. doi: 10.18637/jss.v102.i06 (URL: https://doi.org/10.18637/jss.v102.i06).

@Article{,
    title = {The {R} Package {stagedtrees} for Structural Learning of Stratified Staged Trees},
    author = {Federico Carli and Manuele Leonelli and Eva Riccomagno and Gherardo Varando},
    journal = {Journal of Statistical Software},
    year = {2022},
    volume = {102},
    number = {6},
    pages = {1--30},
    doi = {10.18637/jss.v102.i06},
  }

Overview

stagedtrees is a package that implements staged event trees, a class of probability models for categorical random variables.

Installation

# Install stable version from CRAN:
install.packages("stagedtrees")

# Or the development version from GitHub:
remotes::install_github("stagedtrees/stagedtrees")

Usage

With the stagedtrees package it is possible to estimate (stratified) staged event trees from data, use them to compute probabilities, make predictions, visualize and compare different models.

library("stagedtrees")

tree <- Titanic |> full() |> stages_bhc() |> stndnaming(uniq = TRUE)

prob(tree, c(Survived="Yes"), conditional_on = c(Age="Adult"))
#> [1] 0.3107124

palette("Okabe-Ito")
par(mfrow = c(1,2))
plot(tree, col = "stages")
barplot(tree, var = "Survived", main = "P(Survived|-)", col = "stages")

Metadata

Version

2.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows