Test edge weight differences between all pairs or a subset of pairs of
a group_tna object. See permutation_test.tna() for more details.
Usage
# S3 method for class 'group_tna'
permutation_test(
x,
groups,
adjust = "none",
iter = 1000,
paired = FALSE,
level = 0.05,
measures = character(0),
consecutive = FALSE,
...
)Arguments
- x
A
group_tnaobject- groups
An
integervector or acharactervector of group indices or names, respectively, defining which groups to compare. When not provided, all pairs are compared (the default).- adjust
A
characterstring for the method to adjust p-values with for multiple comparisons. The default is"none"for no adjustment. See themethodargument ofstats::p.adjust()for details and available adjustment methods.- iter
An
integergiving the number of permutations to perform. The default is 1000.- paired
A
logicalvalue. IfTRUE, perform paired permutation tests; ifFALSE, perform unpaired tests. The default isFALSE.- level
A
numericvalue giving the significance level for the permutation tests. The default is 0.05.- measures
A
charactervector of centrality measures to test. Seecentralities()for a list of available centrality measures.- consecutive
A
logicalvalue. IfFALSE(the default), all pairwise comparisons are performed in lexicographic order with respect to the order of the groups. IfTRUE, only comparisons between consecutive pairs of groups are performed.- ...
Additional arguments passed to
centralities().
See also
Validation functions
bootstrap(),
deprune(),
estimate_cs(),
permutation_test(),
plot.group_tna_bootstrap(),
plot.group_tna_permutation(),
plot.group_tna_stability(),
plot.tna_bootstrap(),
plot.tna_permutation(),
plot.tna_reliability(),
plot.tna_stability(),
print.group_tna_bootstrap(),
print.group_tna_permutation(),
print.group_tna_stability(),
print.summary.group_tna_bootstrap(),
print.summary.tna_bootstrap(),
print.tna_bootstrap(),
print.tna_clustering(),
print.tna_permutation(),
print.tna_reliability(),
print.tna_stability(),
prune(),
pruning_details(),
reliability(),
reprune(),
summary.group_tna_bootstrap(),
summary.tna_bootstrap()
Examples
model <- group_model(engagement_mmm)
# Small number of iterations for CRAN
permutation_test(model, iter = 20)
#> Cluster 1 vs. Cluster 2 :
#> # A tibble: 9 × 4
#> edge_name diff_true effect_size p_value
#> <chr> <dbl> <dbl> <dbl>
#> 1 Active -> Active 0.0189 0.741 0.286
#> 2 Average -> Active 0.220 3.26 0.0476
#> 3 Disengaged -> Active -0.108 -5.61 0.0476
#> 4 Active -> Average -0.0699 -3.37 0.0476
#> 5 Average -> Average -0.0875 -1.17 0.238
#> 6 Disengaged -> Average -0.349 -6.54 0.0476
#> 7 Active -> Disengaged 0.0509 2.62 0.0952
#> 8 Average -> Disengaged -0.132 -3.78 0.0476
#> 9 Disengaged -> Disengaged 0.457 8.54 0.0476
#>
#> Cluster 1 vs. Cluster 3 :
#> # A tibble: 9 × 4
#> edge_name diff_true effect_size p_value
#> <chr> <dbl> <dbl> <dbl>
#> 1 Active -> Active 0.277 5.95 0.0476
#> 2 Average -> Active 0.159 1.56 0.190
#> 3 Disengaged -> Active 0.0479 1.45 0.190
#> 4 Active -> Average -0.0358 -0.921 0.238
#> 5 Average -> Average -0.277 -2.08 0.143
#> 6 Disengaged -> Average -0.438 -6.27 0.0476
#> 7 Active -> Disengaged -0.241 -8.40 0.0476
#> 8 Average -> Disengaged 0.118 1.53 0.190
#> 9 Disengaged -> Disengaged 0.390 5.84 0.0476
#>
#> Cluster 2 vs. Cluster 3 :
#> # A tibble: 9 × 4
#> edge_name diff_true effect_size p_value
#> <chr> <dbl> <dbl> <dbl>
#> 1 Active -> Active 0.258 3.86 0.0476
#> 2 Average -> Active -0.0602 -1.46 0.190
#> 3 Disengaged -> Active 0.156 2.15 0.0952
#> 4 Active -> Average 0.0341 0.885 0.381
#> 5 Average -> Average -0.190 -2.34 0.0476
#> 6 Disengaged -> Average -0.0889 -1.15 0.381
#> 7 Active -> Disengaged -0.292 -6.26 0.0476
#> 8 Average -> Disengaged 0.25 2.92 0.0476
#> 9 Disengaged -> Disengaged -0.0667 -0.748 0.571
#>
