library(simone)
## Data set generation
p <- 100 # number of nodes
n <- 200 # sample size
proba.in <- 0.15
proba.out <- 0.005
alpha <- c(.3,.2,.5)
X <- SimDataAffiliation (p, n, proba.in, proba.out, alpha, proba.dust=0.2)
## Build a penalty matrix with an arbitrary base-value of rho and
## multiplier values that encourage affiliation structure
P <- Penalty(X$data, rho = 0.1, classes = X$cl.theo,
multipliers = list(intra=1,inter=1.5,dust=2))
par(mfrow=c(1,2))
Mplot(P, main="Penalty matrix")
Mplot(P, X$cl.theo, main="Ordered penalty matrix")
Run the code above in your browser using DataLab