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_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_permutation(),
print.tna_stability(),
prune(),
pruning_details(),
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.740 0.429
#> 2 Average -> Active 0.220 3.62 0.0476
#> 3 Disengaged -> Active -0.108 -3.61 0.0476
#> 4 Active -> Average -0.0699 -3.68 0.0476
#> 5 Average -> Average -0.0875 -1.44 0.238
#> 6 Disengaged -> Average -0.349 -7.99 0.0476
#> 7 Active -> Disengaged 0.0509 2.33 0.0476
#> 8 Average -> Disengaged -0.132 -3.00 0.0476
#> 9 Disengaged -> Disengaged 0.457 8.57 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 6.40 0.0476
#> 2 Average -> Active 0.159 1.98 0.143
#> 3 Disengaged -> Active 0.0479 1.22 0.381
#> 4 Active -> Average -0.0358 -0.830 0.381
#> 5 Average -> Average -0.277 -2.67 0.0476
#> 6 Disengaged -> Average -0.438 -6.08 0.0476
#> 7 Active -> Disengaged -0.241 -8.55 0.0476
#> 8 Average -> Disengaged 0.118 2.36 0.0952
#> 9 Disengaged -> Disengaged 0.390 4.49 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 4.69 0.0476
#> 2 Average -> Active -0.0602 -1.40 0.190
#> 3 Disengaged -> Active 0.156 2.26 0.0476
#> 4 Active -> Average 0.0341 0.875 0.381
#> 5 Average -> Average -0.190 -2.56 0.0476
#> 6 Disengaged -> Average -0.0889 -1.05 0.333
#> 7 Active -> Disengaged -0.292 -8.40 0.0476
#> 8 Average -> Disengaged 0.25 3.90 0.0476
#> 9 Disengaged -> Disengaged -0.0667 -0.843 0.429
#>
