plot.enr {GGMnonreg} | R Documentation |
Plot enr
Objects
Description
Plot the probability mass function for ENR.
Usage
## S3 method for class 'enr'
plot(x, iter = 1e+05, fill = "#009E73", alpha = 0.5, ...)
Arguments
x |
An object of class |
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
# 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(est)
[Package GGMnonreg version 1.0.0 Index]