Estimates the stability of centrality measures in a network using subset sampling without replacement. It allows for dropping varying proportions of cases and calculates correlations between the original centralities and those computed using sampled subsets.
estimate_cs(x, ...)estimate_centrality_stability(x, ...)
# S3 method for tna
estimate_cs(
x,
loops = FALSE,
normalize = FALSE,
measures = c("InStrength", "OutStrength", "Betweenness"),
iter = 1000,
method = "pearson",
drop_prop = seq(0.1, 0.9, by = 0.1),
threshold = 0.7,
certainty = 0.95,
detailed = FALSE,
progressbar = FALSE,
...
)
# S3 method for tna
estimate_centrality_stability(
x,
loops = FALSE,
normalize = FALSE,
measures = c("InStrength", "OutStrength", "Betweenness"),
iter = 1000,
method = "pearson",
drop_prop = seq(0.1, 0.9, by = 0.1),
threshold = 0.7,
certainty = 0.95,
detailed = FALSE,
progressbar = FALSE,
...
)
# S3 method for group_tna
estimate_cs(
x,
loops = FALSE,
normalize = FALSE,
measures = c("InStrength", "OutStrength", "Betweenness"),
iter = 1000,
method = "pearson",
drop_prop = seq(0.1, 0.9, by = 0.1),
threshold = 0.7,
certainty = 0.95,
detailed = FALSE,
progressbar = FALSE,
...
)
# S3 method for group_tna
estimate_centrality_stability(
x,
loops = FALSE,
normalize = FALSE,
measures = c("InStrength", "OutStrength", "Betweenness"),
iter = 1000,
method = "pearson",
drop_prop = seq(0.1, 0.9, by = 0.1),
threshold = 0.7,
certainty = 0.95,
detailed = FALSE,
progressbar = FALSE,
...
)
A tna_stability
object which is a list
with an element for each
measure
with the following elements:
cs_coefficient
: The centrality stability (CS) coefficient
of the measure.
correlations
: A matrix
of correlations between the original
centrality and the resampled centralities for each drop proportion.
detailed_results
: A detailed data frame of the sampled correlations,
returned only if return_detailed = TRUE
If x
is a group_tna
object, a group_tna_stability
object is returned
instead, which is a list
of tna_stability
objects.
A tna
or a group_tna
object representing the temporal network
analysis data. The object should be created from a sequence data object.
Ignored.
A logical
value indicating whether to include loops in the
network when computing the centrality measures (default is FALSE
).
A logical
value indicating whether to normalize
the centrality measures. The default is FALSE
.
A character
vector of centrality measures to estimate.
The default measures are "InStrength"
, "OutStrength"
,
and "Betweenness"
. See centralities()
for a list of available centrality
measures.
An integer
specifying the number of resamples to draw.
The default is 1000.
A character
string indicating the correlation coefficient
type. The default is "pearson"
. See stats::cor()
for details.
A numeric
vector specifying the proportions of
cases to drop in each sampling iteration. Default is a sequence from 0.1 to
0.9 in increments of 0.1.
A numeric
value specifying the correlation threshold for
calculating the CS-coefficient. The default is 0.7.
A numeric
value specifying the desired level of certainty
for the CS-coefficient. Default is 0.95.
A logical
value specifying whether to return detailed
sampling results. If TRUE
, detailed results are included in the output.
The default is FALSE
.
A logical
value. If TRUE
, a progress bar is displayed
Defaults to FALSE
The function works by repeatedly resampling the data, dropping varying proportions of cases, and calculating centrality measures on the subsets. The correlation between the original centralities and the resampled centralities is calculated for each drop proportion. The stability of each centrality measure is then summarized using a centrality stability (CS) coefficient, which represents the proportion of dropped cases at which the correlations drop below a given threshold (default 0.7).
The results can be visualized by plotting the output object showing the stability of the centrality measures across different drop proportions, along with confidence intervals. The CS-coefficients are displayed in the subtitle.
Cluster-related functions
bootstrap()
,
centralities()
,
cliques()
,
communities()
,
deprune()
,
group_model()
,
hist.group_tna()
,
mmm_stats()
,
plot.group_tna()
,
plot.group_tna_centralities()
,
plot.group_tna_cliques()
,
plot.group_tna_communities()
,
plot.group_tna_stability()
,
plot_compare.group_tna()
,
plot_mosaic.group_tna()
,
plot_mosaic.tna_data()
,
print.group_tna()
,
print.group_tna_bootstrap()
,
print.group_tna_centralities()
,
print.group_tna_cliques()
,
print.group_tna_communities()
,
print.group_tna_stability()
,
print.summary.group_tna()
,
print.summary.group_tna_bootstrap()
,
prune()
,
pruning_details()
,
rename_groups()
,
reprune()
,
summary.group_tna()
,
summary.group_tna_bootstrap()
Cluster-related functions
bootstrap()
,
centralities()
,
cliques()
,
communities()
,
deprune()
,
group_model()
,
hist.group_tna()
,
mmm_stats()
,
plot.group_tna()
,
plot.group_tna_centralities()
,
plot.group_tna_cliques()
,
plot.group_tna_communities()
,
plot.group_tna_stability()
,
plot_compare.group_tna()
,
plot_mosaic.group_tna()
,
plot_mosaic.tna_data()
,
print.group_tna()
,
print.group_tna_bootstrap()
,
print.group_tna_centralities()
,
print.group_tna_cliques()
,
print.group_tna_communities()
,
print.group_tna_stability()
,
print.summary.group_tna()
,
print.summary.group_tna_bootstrap()
,
prune()
,
pruning_details()
,
rename_groups()
,
reprune()
,
summary.group_tna()
,
summary.group_tna_bootstrap()
model <- tna(group_regulation)
# Small number of iterations and drop proportions for CRAN
estimate_cs(
model,
drop_prop = seq(0.3, 0.9, by = 0.2),
measures = c("InStrength", "OutStrength"),
iter = 10
)
Run the code above in your browser using DataLab