Learn R Programming

tnet (version 0.1.2)

random_values: Finds the randomly expected values by simulations

Description

Finds the randomly expected values by simulations

Usage

random_values(net, NR=1000, step=c(1,2,3))

Arguments

net
A weighted edgelist
NR
Number of random networks
step
Which steps to perform: 1) calculating values on observed network, 2) calculating values on weight reshuffled networks, and 3) calculating values on link reshuffled networks.

Value

  • Summary information is written to the screen, and detailed information is returned as follows: [[1]][[1]] This is variable 1, which is the weighted clustering coefficient: clustering_w(net, measure=c("am", "gm", "ma", "mi","bi")) [[2]] This is variable 2, which is binary distance matrix: distance_w(net.b) [[3]] This is variable 3, which is weighted distance matrix: distance_w(net) [[4]] This is variable 4, which is matrix with the results from the weight reshuffled random networks (rows) and different measures (columns), which are 1 to 5: clustering_w(net.r, measure=c("am", "gm", "ma", "mi","bi")) 6: average binary distance 7: average weighted distance 8: normalised weighted distance 9: size of giant component [[5]] This is variable 5, which is matrix with the results from the link reshuffled random networks (rows) and different measures (columns), which are 1 to 5: clustering_w(net.r, measure=c("am", "gm", "ma", "mi","bi")) 6: average binary distance 7: average weighted distance 8: normalised weighted distance 9: size of giant component

Examples

Run this code
## Load sample data
sample <- rbind(
c(1,2,4),
c(1,3,2),
c(2,1,4),
c(2,3,4),
c(2,4,1),
c(2,5,2),
c(3,1,2),
c(3,2,4),
c(4,2,1),
c(5,2,2),
c(5,6,1),
c(6,5,1))

## Run the programme
random_values(sample, NR=2)

Run the code above in your browser using DataLab