bayesvl: BayesVL package for Bayesian statistical analyses in R

Description Details Author(s) References See Also Examples

View source: R/bayesvl.R

Description

The R package for visually learning the graphical structures of Bayesian networks, and performing Hamiltonian MCMC with Stan through bvl_model2Stan, bvl_modelFit

Details

Package: bayesvl
Type: Package
Version: 0.8.0
Date: 13 May 2019
License: GPL-3
Website: Bayesvl

Author(s)

Quan-Hoang Vuong, Viet-Phuong La

References

For documentation, case studies and worked examples, and other tutorial information visit the References section on our Github:

See Also

bayesvl-class, bvl_modelFit, bvl_model2Stan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	# Design the model in directed acyclic graph
	model <- bayesvl()
	
	# add observed data nodes to the model
	model <- bvl_addNode(model, "Lie", "binom")
	model <- bvl_addNode(model, "B", "binom")
	model <- bvl_addNode(model, "C", "binom")
	model <- bvl_addNode(model, "T", "binom")
	
	# add path between nodes
	model <- bvl_addArc(model, "B", "Lie", "slope")
	model <- bvl_addArc(model, "C", "Lie", "slope")
	model <- bvl_addArc(model, "T", "Lie", "slope")
  
  summary(model)

Example output

Loading required package: rstan
Loading required package: StanHeaders
Loading required package: ggplot2
rstan (Version 2.21.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
Warning message:
In file(con, "r") : cannot open file '/proc/stat': Permission denied
Model Info:
  nodes:     4
  arcs:      3
  scores:    NA
  formula:   Lie ~ a_Lie + b_B_Lie * B + b_C_Lie * C + b_T_Lie * T

Estimates:
  model is not estimated.

bayesvl documentation built on May 24, 2019, 5:09 p.m.

Related to bayesvl in bayesvl...