fg_summary {flowGraph} | R Documentation |
Calculates feature summary statistics for flowGraph features;
users can choose from a list of statistical significance tests/adjustments
or define custom summary functions.
For special cases, see example in function
fg_add_summary
on
how to manually calculate summary statistics without using this function.
fg_summary( fg, no_cores = 1, class = "class", label1 = NULL, label2 = NULL, class_labels = NULL, node_features = "SpecEnr", edge_features = "NONE", test_name = "t_diminish", diminish = TRUE, p_thres = 0.05, p_rate = 2, test_custom = "t", effect_size = TRUE, adjust0 = TRUE, adjust0_lim = c(-0.1, 0.1), btwn = TRUE, btwn_test_custom = "t", save_functions = FALSE, overwrite = FALSE )
fg |
flowGraph object. |
no_cores |
An integer indicating how many cores to parallelize on. |
class |
A string corresponding to the column name or index
of |
label1 |
A string from the |
label2 |
A string from the |
class_labels |
A list of vectors, each containing two strings
represeting labels to compare; this parameter is an alternative to
parameters |
node_features |
A string vector indicating which node feature(s)
to perform summary statistics on; set to |
edge_features |
A string vector indicating which edge feature(s)
to perform summary statistics on; set to |
test_name |
A string with the name of the test you are performing. |
diminish |
A logical variable indicating whether to use
diminishing summary statistics;
if |
p_thres |
A double indicating the summary statistic threshold;
if the result of a statistical test is greater than |
p_rate |
A double; if |
test_custom |
A function or a string indicating the statistical test
to use. If a string is provided, it should be one of
|
effect_size |
A logical variable indicating whether or not to calculate effect size statistic (cohen's d) for this set of class labels; later used for plotting. |
adjust0 |
A logical variable indicating whether or not to calculate the
minimum percentage of values from samples of each class label that falls
within the range of |
adjust0_lim |
A vector of two numeric values indicating a range around 0, default set to -0.1 and 0.1. |
btwn |
A logical variable indicating whether or not to calculate the
|
btwn_test_custom |
Same as |
save_functions |
A logical variable indicating whether to save test and adjust functions. |
overwrite |
A logical variable indicating whether to overwrite the existing summary statistics if it exists. |
fg_summary
calculates a summary statistic as specified
by the user in parameters test_name
, diminish
(p_thres
, p_rate
), and test_custom
.
The test is done for a node or edge feature of interest within a given
flowGraph object as specified by parameters node_features
,
edge_features
. It then returns information on the summary statistic
inside the same flowGraph object and returns it to the user.
See flowGraph-class
slot summary
for details on the contents.
flowGraph object containing claculated summary statistics.
flowGraph-class
fg_clear_summary
no_cores <- 1 data(fg_data_pos30) fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class, prop=FALSE, specenr=FALSE, no_cores=no_cores) fg_get_summary_desc(fg) fg <- fg_summary(fg, no_cores=no_cores, class="class", label1="control", overwrite=FALSE, test_name="t", diminish=FALSE, node_features="count", edge_features="NONE") fg_get_summary_desc(fg)