Description Usage Arguments Value Author(s) Examples
View source: R/network.permutation.R
Computes a permutation test to determine whether there are difference in centrality and global network measures
1 2 3 4 5 6 7 8 9 10 11 |
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 |
|
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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 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.