Learn R Programming

BGGM (version 2.1.5)

plot.summary.ggm_compare_estimate: Plot summary.ggm_compare_estimate Objects

Description

Visualize the posterior distribution differences.

Usage

# S3 method for summary.ggm_compare_estimate
plot(x, color = "black", size = 2, width = 0, ...)

Value

An object of class ggplot

Arguments

x

An object of class ggm_compare_estimate.

color

Character string. The color of the points (defaults to "black").

size

Numeric. The size of the points (defaults to 2).

width

Numeric. The width of error bar ends (defaults to 0).

...

Currently ignored.

See Also

ggm_compare_estimate

Examples

Run this code
# \donttest{
# note: iter = 250 for demonstrative purposes
# data
Y <- bfi[complete.cases(bfi),]

# males and females
Ymale <- subset(Y, gender == 1,
                select = -c(gender,
                            education))[,1:10]

Yfemale <- subset(Y, gender == 2,
                  select = -c(gender,
                              education))[,1:10]

# fit model
fit <- ggm_compare_estimate(Ymale,  Yfemale,
                            type = "ordinal",
                            iter = 250,
                            prior_sd = 0.25,
                            progress = FALSE)

plot(summary(fit))
# }

Run the code above in your browser using DataLab