Calculate two-sided exact p-perm value for a node permutation test, with optional plot of observed coefficient vs. distribution of coefficients from permuted networks
pperm(obs, permcoefs, alpha = 0.05, plot = TRUE, coefname = "")
obs | Numeric; observed coefficient |
---|---|
permcoefs | Numeric vector; coefficients derived from permuted networks |
alpha | Numeric; the criterion for significance (defaults to .05) |
plot | Logical; if TRUE (default), distribution plot will be included in output; if FALSE, only p-perm will be calculated |
coefname | Optional character string; used to specify type of coefficent for x-axis label of plot (if not provided, x-axis label will just be 'Coefficient') |
Either a single numeric value representing p-perm if plot=FALSE; otherwise a list including both the plot and p-perm value