|
I have a dataset that defines the chance that any two nodes are connected by an edge (graph theory terminology). So, the mean connectivity for a given node can range from 0 (no connections) to 1 (connected to everyone) and across all the nodes (say, 50) forms a distribution that is non-binomial:
p = [0.285 0.214 0.285 0.071 0 0 0 0.142 0 0 0]
I'd like to model the network of connections and have been attempting to do this by randomly generating 0 or 1 for each potential connection in the network (I will then analyze in multiple iterations to understand the type of network that is formed).
So far, I have been able to randomly generate these zeros and ones from a binomial distribution around the mean connectivity of population (e.g. using binornd). Now I'd like to do this using the realistic probability distribution above.
I have been playing around with inversion methods and with Jos' randp (FEX: http://www.mathworks.com/matlabcentral/fileexchange/8891) but can not figure out the correct implementation to get the zeros and ones. Can anyone help me out this?
Many thanks,
Mike
|