Calculate permutation p-values and plot group differences

Description

For a given (global- or vertex-level) graph measure, determine the permutation p-value and create a plot showing group differences, either across densities or regions. You may specify the α-level; a red asterisk is added if p < α and a blue asterisk is added if α < p < 0.1 (i.e. a "trend"). You may also choose whether you want a one- or two-sided test.

Usage

1
2
3
plot_perm_diffs(g1, g2, perm.dt, measure, level = c("graph", "vertex"),
  auc = FALSE, alternative = c("two.sided", "less", "greater"),
  alpha = 0.05, groups = NULL, ylabel = NULL)

Arguments

g1

List of igraph graph objects for group 1

g2

List of igraph graph objects for group 2

perm.dt

Data table with the permutation results

measure

Character string for the graph measure of interest

level

Character string, either 'graph' or 'vertex'

auc

Logical indicating whether the data refer to area-under-the-curve (across all densities) (default: FALSE)

alternative

Character string, whether to do a two- or one-sided test (default: 'two.sided')

alpha

Significance level (default: 0.05)

groups

Character vector of group names (default: NULL)

ylabel

Character string for y-axis label (default: NULL)

Value

A list with three elements:

dt

A data table with p-values for each density/region

p1

A ggplot plotting object

p2

A ggplot plotting object

Author(s)

Christopher G. Watson, cgwatson@bu.edu

See Also

permute.group

Examples

1
2
3
4
5
6
7
## Not run: 
perms.mod.sig <- perms.sig(g[[1]], g[[2]], perms.all, 'mod', level='graph',
  'less', groups, ylabel='Modularity')
perms.mod.btwn <- perms.sig(g[[1]], g[[2]], perms.btwn, 'btwn.cent',
  level='vertex')

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.