bootstrap {tna} | R Documentation |
Bootstrap Transition Networks from Sequence Data
Description
Perform bootstrapping on transition networks created from
sequence data stored in a tna
object. Bootstrapped estimates
of edge weights are returned with confidence intervals and significance
testing.
Usage
bootstrap(x, ...)
## S3 method for class 'tna'
bootstrap(
x,
iter = 1000,
level = 0.05,
method = "stability",
threshold,
consistency_range = c(0.75, 1.25),
...
)
## S3 method for class 'group_tna'
bootstrap(
x,
iter = 1000,
level = 0.05,
method = "stability",
threshold,
consistency_range = c(0.75, 1.25),
...
)
Arguments
x |
A |
... |
Ignored. |
iter |
An |
level |
A |
method |
A |
threshold |
A |
consistency_range |
A |
Details
The function first computes the original edge weights for the specified
cluster from the tna
object. It then performs bootstrapping by resampling
the sequence data and recalculating the edge weights for each
bootstrap sample. The mean and standard deviation of the transitions are
computed, and confidence intervals are derived. The function also estimates
p-values for each edge and identifies significant edges based on
the specified significance level. A matrix of significant edges
(those with estimated p-values below the significance level) is generated.
Additional statistics on removed edges (those not considered
significant) are provided.
All results, including the original transition matrix, bootstrapped estimates, and summary statistics for removed edges, are returned in a structured list.
Value
A tna_bootstrap
object which is a list
containing the
following elements:
-
weights_orig
: The original edge weightmatrix
. -
weights_sig
: Thematrix
of significant transitions (those with estimated p-values below the significance level). -
weights_mean
: The mean weightmatrix
from the bootstrap samples. -
weights_sd
: The standard deviationmatrix
from the bootstrap samples. -
cr_lower
: The lower boundmatrix
of the consistency range for the edge weights. -
cr_upper
: The upper boundmatrix
of the consistency range for the edge weights. -
ci_lower
: The lower boundmatrix
of the bootstrap confidence intervals for the edge weights. -
ci_upper
: The upper boundmatrix
of the bootstrap confidence intervals for the edge weights. -
p_values
: Thematrix
of estimated p-values for the edge weights. -
summary
: Adata.frame
summarizing the edges, their weights, p-values, statistical significance, consistency ranges, and confidence intervals.
If x
is a group_tna
object, the output is a group_tna_bootstrap
object, which is a list
of tna_bootstrap
objects.
See Also
Validation functions
deprune()
,
estimate_cs()
,
permutation_test()
,
permutation_test.group_tna()
,
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 <- tna(group_regulation)
# Small number of iterations for CRAN
bootstrap(model, iter = 10)