| permutation_test | R Documentation |
This function compares two networks built from sequence data using permutation tests. The function builds Markov models for two sequence objects, computes the transition probabilities, and compares them by performing permutation tests. It returns the differences in transition probabilities, effect sizes, estimated p-values, and confidence intervals.
permutation_test(x, ...)
## S3 method for class 'tna'
permutation_test(
x,
y,
adjust = "none",
iter = 1000,
paired = FALSE,
level = 0.05,
measures = character(0),
actor = NULL,
...
)
x |
A |
... |
Additional arguments passed to |
y |
A |
adjust |
A |
iter |
An |
paired |
A |
level |
A |
measures |
A |
actor |
An optional actor identifier for sequences nested in actors
(for example, several sessions per student). Either a |
A tna_permutation object which is a list with two elements:
edges and centralities (NULL when measures is empty). Both contain
the following elements:
stats: A data.frame of original differences, effect sizes, and
estimated p-values, with one row per edge (columns edge_name,
diff_true, effect_size, p_value) or per state and centrality
measure (columns state, centrality, diff_true, effect_size,
p_value). The effect size is the observed difference divided by the
standard deviation of the differences of the permuted samples, and
NA when the permuted differences do not vary.
diffs_true: The differences in the data: a matrix for the edges,
and a data.frame with one row per state and one column per measure
for the centralities.
diffs_sig: The same as diffs_true with the non-significant
differences set to zero.
Use summary.tna_permutation() for the results as a tidy table.
Good, P. (2005). Permutation, Parametric, and Bootstrap Tests of Hypotheses (3rd ed.). Springer.
Validation functions
bootstrap(),
deprune(),
estimate_cs(),
markov_order(),
permutation_test.group_tna(),
plot.group_tna_bootstrap(),
plot.group_tna_permutation(),
plot.group_tna_stability(),
plot.tna_bootstrap(),
plot.tna_markov_order(),
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.summary.tna_markov_order(),
print.tna_bootstrap(),
print.tna_markov_order(),
print.tna_permutation(),
print.tna_reliability(),
print.tna_stability(),
prune(),
pruning_details(),
reliability(),
reprune(),
summary.group_tna_bootstrap(),
summary.tna_bootstrap(),
summary.tna_markov_order(),
summary.tna_permutation(),
summary.tna_reliability(),
summary.tna_stability()
model_x <- tna(head(group_regulation, 200))
model_y <- tna(tail(group_regulation, 200))
# Small number of iterations for CRAN
permutation_test(model_x, model_y, iter = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.