Learn R Programming

easybgm (version 0.2.1)

structure_probs: Plot Posterior Structure Probabilities

Description

Plots the posterior structure probabilities of all visited structures, sorted from the most to the least probable.

Usage

plot_structure_probabilities(output, as_BF = FALSE, ...)

Value

Returns a plot

Arguments

output

Output object from the easybgm function. Supports also objects from the bgm function of the bgms package.

as_BF

If TRUE plots the y-axis as Bayes factors instead of posterior structure probability. Default is FALSE.

...

Additional arguments passed onto ggplot2

Examples

Run this code
# \donttest{

library(easybgm)
library(bgms)

data <- na.omit(Wenchuan)
fit <- easybgm(data, type = "ordinal", save = TRUE, edge_selection = TRUE,
                iter = 1000  # for demonstration only (> 5e4 recommended)
                )

plot_structure_probabilities(fit)
# }

Run the code above in your browser using DataLab