View source: R/network.permutation.R
network.permutation | R Documentation |
Computes a permutation test to determine whether there are difference in centrality and global network measures
network.permutation( sample1 = NULL, sample2 = NULL, iter, network = c("glasso", "ising", "TMFG", "LoGo"), measure = c("betweenness", "closeness", "strength", "eigenvector", "rspbc", "hybrid", "ASPL", "CC", "S", "Q"), alternative = c("less", "greater", "two.tailed"), ncores, prev.perm = NULL, ... )
sample1 |
Matrix or data frame.
Sample to be compared with |
sample2 |
Matrix or data frame.
Sample to be compared with |
iter |
Numeric.
Number of iterations to perform.
Defaults to |
network |
Character.
Network estimation method to apply to the datasets.
Defaults to |
measure |
Character. Network measure to be compared in the permutation test |
alternative |
Character.
Alternative hypothesis test to perform.
Defaults to |
ncores |
Numeric.
Number of computer processing cores to use for bootstrapping samples.
Defaults to n - 1 total number of cores.
Set to any number between 1 and maximum amount of cores on your computer
(see |
prev.perm |
|
... |
Additional arguments for |
Returns a list containing two objects:
result |
The results of the permutation test. For centrality measures,
this is a matrix where the rows represent each node and the columns are
the observed values of the centrality measure for |
networks |
A list containing two lists: |
Alexander Christensen <alexpaulchristensen@gmail.com>
# Split data (only for example) split1 <- neoOpen[c(1:401),] split2 <- neoOpen[c(402:802),] # Perform permutation test perm.str <- network.permutation(split1, split2, iter = 1000, network = "glasso", measure = "strength", alternative = "two.tailed", ncores = 2) # Check results perm.str$result # Permutation to check other measures (using networks from previous result) perm.aspl <- network.permutation(prev.perm = perm.str, measure = "ASPL", ncores = 2) # Check results perm.aspl$result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.