bayesvl-class | R Documentation |
bayesvl
: Object Class for BayesVL ModelsAn S4 class that represents a Bayesian model created using the bayesvl
package.
This object is typically returned by functions such as bayesvl
.
call
Original function call that created the model.
nodes
List of nodes in the model.
arcs
List of arcs (edges) connecting the nodes.
pars
List of model parameters.
stanfit
An object of class stanfit
, representing the fitted Stan model.
rawdata
A data frame containing observed input data.
standata
Data list used for Stan sampling.
posterior
A data frame representation of posterior draws from the stanfit
object.
elapsed
Elapsed time for the MCMC simulation (in seconds).
show
signature(object = "bayesvl")
: Prints a default summary of the model.
summary
Displays a more detailed overview of the model structure and output.
For documentation, case studies, worked examples, and other tutorial materials, visit our GitHub:
For case studies using the package in research articles, refer to:
bayesvl
# Design the model in a 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 paths between nodes
model <- bvl_addArc(model, "B", "Lie", "slope")
model <- bvl_addArc(model, "C", "Lie", "slope")
model <- bvl_addArc(model, "T", "Lie", "slope")
# Summarize the model
summary(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.