plot_enr: Plot 'enr' Objects

Description Usage Arguments Value Examples

View source: R/enr.R

Description

Plot the probability mass function for ENR.

Usage

1
plot_enr(x, iter = 1e+05, fill = "#009E73", alpha = 0.5, ...)

Arguments

x

An object of class enr.

iter

Integer. How many draws from the Poisson-binomial distribution (defaults to 1,000)?

fill

Which color to fill the density?

alpha

Numeric (between 0 and 1). The transparency for the density.

...

Currently ignored

Value

An object of class ggplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# correlations
cors <- cor(GGMnonreg::ptsd)

# inverse
inv <- solve(cors)

# partials
pcors <-  -cov2cor(inv)

# set values to zero
pcors <- ifelse(abs(pcors) < 0.05, 0, pcors )

est <- enr(net = pcors, n = 500, replications = 2)

# plot
plot_enr(est)

donaldRwilliams/GGMnonreg documentation built on Nov. 13, 2021, 9:57 a.m.