Description Usage Arguments Value Examples
View source: R/roll_your_own.R
Plot roll_your_own
Objects
1 2 |
x |
An object of class |
fill |
Character string specifying the color for the ridges. |
alpha |
Numeric. Transparancey of the ridges |
... |
Currently ignored |
An object of class ggplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ####################################
###### example 1: assortment #######
####################################
# assortment
library(assortnet)
Y <- BGGM::bfi[,1:10]
membership <- c(rep("a", 5), rep("c", 5))
# fit model
fit <- estimate(Y = Y, iter = 250,
progress = FALSE)
# membership
membership <- c(rep("a", 5), rep("c", 5))
# define function
f <- function(x,...){
assortment.discrete(x, ...)$r
}
net_stat <- roll_your_own(object = fit,
FUN = f,
types = membership,
weighted = TRUE,
SE = FALSE, M = 1,
progress = FALSE)
# plot
plot(net_stat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.