Description Usage Arguments Details Value Author(s) References Examples
Calculates the actual partition index of a simple sympatry network and estimates its random expectancy under a Bernoulli graph model.
1 | partitionindex(iptsymp, replica = 1)
|
iptsymp |
Adjacency matrix associated to the network of interest. |
replica |
Integer between 1 and 5000. Corresponds to the number of random adjacency matrices to be generated. |
The partition index (PI) is based on the clustering coefficient measure (C). For each network node, it takes into account the maximum between its own C value and the lowest C value recorded at its open neighbourhood. The selected value is known as clustering performance after Dos Santos et al. (2008). Finally, the mean of clustering performance is calculated.
(PI) is the statisitc to test the adequacy of the the newtork to be segregated into highly connected groups of species. The test counts the number of random simple graphs that yields a PI value higher or equal to the observed one.
Random expectancy for (PI) is based on matrices following a Bernoulli model. A random number between 0 and 1 is generated for each pair of species in the network. If this number is lower than the observed density for the the network, the respective pair of species will remain tied in the random network.
The input argument iptsymp
corresponds to any adjacency matrix that
reflects the incidence (1) or not (0) of a sympatric link between pairs of
species. If the input matrix is valued, scores higher than
zero will be automatically coded 1 (otherwise, they will be coded 0).
If replica
> 1, returns a list containing:
ProbTie |
Density of network associated to. |
PIobserved |
Observed (PI). |
PIrandomized |
Statistical summary of the randomly expected indices calculated
through |
ProbTie |
Fraction of random scenarios where the calculated (PI) is higher than (or equal to) the observed one. |
If replica
= 1, the (PI) of the observed matrix is calculated.
Daniel A. Dos Santos <dadossantos@csnat.unt.edu.ar>
Dos Santos D.A., Fernandez H.R., Cuezzo M.G., Dominguez E. 2008. Sympatry Inference and Network Analysis in Biogeography. Systematic Biology 57:432-448.
1 2 3 4 5 6 7 8 9 | #Creates a Bernoulli graph of 100 nodes
A <- matrix(0, 100, 100)
aux <- ifelse(runif(choose(100, 2)) <= 0.3, 1, 0)
A[row(A) > col(A)] <- aux
A + t(A) -> A
#Prints the partition index on the R console
partitionindex(A)
#Produces 10 random samples and test significancy
partitionindex(A, 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.