summary.JANE {JANE} | R Documentation |
Summarizing JANE fits
Description
S3 summary method for object of class "JANE
".
Usage
## S3 method for class 'JANE'
summary(object, true_labels = NULL, initial_values = FALSE, ...)
Arguments
object |
An object of S3 |
true_labels |
(optional) A numeric, character, or factor vector of known true cluster labels. Must have the same length as number of actors in the fitted network (default is |
initial_values |
A logical; if |
... |
Unused. |
Value
A list of S3 class
"summary.JANE
" containing the following components (Note: N
is the number of actors in the network, K
is the number of clusters, and D
is the dimension of the latent space):
coefficients |
A numeric vector representing the estimated coefficients from the logistic regression model. |
p |
A numeric vector of length |
U |
A numeric |
mus |
A numeric |
omegas |
A numeric |
Z |
A numeric |
uncertainty |
A numeric vector of length |
cluster_labels |
A numeric vector of length |
input_params |
A list with the following components:
|
clustering_performance |
(only if
|
Examples
# Simulate network
mus <- matrix(c(-1,-1,1,-1,1,1),
nrow = 3,
ncol = 2,
byrow = TRUE)
omegas <- array(c(diag(rep(7,2)),
diag(rep(7,2)),
diag(rep(7,2))),
dim = c(2,2,3))
p <- rep(1/3, 3)
beta0 <- 1.0
sim_data <- JANE::sim_A(N = 100L,
model = "NDH",
mus = mus,
omegas = omegas,
p = p,
beta0 = beta0,
remove_isolates = TRUE)
# Run JANE on simulated data
res <- JANE::JANE(A = sim_data$A,
D = 2L,
K = 3L,
initialization = "GNN",
model = "NDH",
case_control = FALSE,
DA_type = "none")
# Summarize fit
summary(res)
# Summarize fit and compare to true cluster labels
summary(res, true_labels = apply(sim_data$Z, 1, which.max))
# Summarize fit using starting values of EM algorithm
summary(res, initial_values = TRUE)