simRankOrder: Find rank order using simulated annealing

Description Usage Arguments Value References See Also Examples

View source: R/sim.rank.order.R

Description

simRankOrder find the rank order for the win-loss relationship

Usage

1
simRankOrder(data, num = 10, alpha = NULL, kmax = 1000)

Arguments

data

a matrix. the win-loss probability matrix which is the second element of the output from conductance

num

number of SimAnnealing (default is set at 10)

alpha

a positive integer that reflects the influence of an observed win/loss interaction on an underlying win-loss probability. It is used in the calculation of the posterior distribution for the win-loss probability of i over j: Beta*(α * c_ij + β, c_ij + β). In the absence of expertise to accurately estimate alpha, it is estimated from the data.

kmax

an integer between 2 to 1000, indicating the number of simulations in each SimAnnealing.

Value

a list of two dataframes.

BestSimulatedRankOrder

a dataframe representing the best simulated rank order.

Costs

the cost of each simulated annealing run

AllSimulatedRankOrder

a dataframe representing all simulated rank orders.

References

Fushing, H., McAssey, M. P., Beisner, B., & McCowan, B. (2011). Ranking network of a captive rhesus macaque society: a sophisticated corporative kingdom. PLoS One, 6(3), e17817-e17817.

See Also

conductance transitivity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# find dominance probability matrix
perm2 <- conductance(confmatrix, maxLength = 2)
## Not run: 
# Note: It takes a while to run the simRankOrder example.
s.rank <- simRankOrder(perm2$p.hat, num = 10, kmax = 1000)
s.rank$BestSimulatedRankOrder
s.rank$Costs
s.rank$AllSimulatedRankOrder

## End(Not run)

Perc documentation built on May 12, 2021, 1:08 a.m.