Learn R Programming

steepness (version 0.2-1)

steeptest: Statistical significance for steepness of dominance hierarchies statistic

Description

Estimates statistical significance for steepness measure on the basis of dyadic dominance indices corrected for chance Dij or based on proportions of wins Pij.

Usage

steeptest(X, rep, names=NULL, method=c("Dij","Pij"), order=TRUE, option.console=FALSE)

Arguments

X
Empirical sociomatrix containing wins-losses frequencies in dyadic encounters. The matrix must be square and numeric.
rep
Number of simulations for carrying out the randomization test.
names
Character vector with individuals' names.
method
A character string indicating which dyadic dominance measure is to be used for the computation of David's scores. One of "Dij" or "Pij", can be abbreviated.
order
Logical, if TRUE, results for Dij, DS and NormDS are ordered according to the individuals' NormDS values. TRUE by default.
option.console
Logical, if TRUE, results of the procedure will be printed in R console. FALSE by default.

Value

  • steeptest returns a list containing the following components:
  • dyadic.dominanceIf method is set to be Dij the function returns the matrix of observed dyadic dominance indices corrected for chance. If method is Pij the matrix of proportions of wins is returned as a part of the output.
  • david.scoresDavid's scores based on Dij or Pij, depending on the specification of the method.
  • norm.david.scoresNormalized David's scores based on dyadic dominance indices corrected for chance or on proportions of wins in dyadic encounters.
  • steepnessSteepness value based on Normalized David's scores.
  • steep.right.pvalueRight-tailed p value for the empirical steepness value under the null hypothesis of random wins.
  • steep.left.pvalueLeft-tailed p value for the empirical steepness value under the null hypothesis of random wins.
  • interceptIntercept of the fitted line based on Normalized David's scores.
  • resultsThe function provides results of the randomization procedure for the steepness measure based on NormDS.

Details

steeptest estimates statistical significance for steepness measures based on dyadic dominance index corrected for chance Dij or based on the matrix of win proportions Pij, depending on the method specified. This procedure simulates a number of sociomatrices under a uniform distribution by means of callings to C routine steep, then computes steepness based on Dij or Pij. Specifically, it computes normalized David's scores, see getNormDS for more details. Then it computes the steepness measure based on these indices, see getStp. After rep simulations the sampling distribution for the statistic (Stp) is estimated. Then statistical significance is computed as follows: $p=NS+1/NOS+1$ Where NS is computed as:
  1. The number of times that simulated values are greater than or equal to the empirical value, if right-tailed p value is calculated.
  2. And the number of times that simulated values are lower than or equal to the empirical value, if left-tailed p value is calculated.
And NOS represents the number of simulated values.

References

David, H. A. (1988). The Method of Paired Comparisons. London: C. Griffin. de Vries, H., Stevens, J. M. G., & Vervaecke, H. (2006). Measuring and testing the steepness of dominance hierarchies. Animal Behaviour, 71, 585-592.

See Also

getDij, getPij, getNormDS

Examples

Run this code
##############################################################################
###               Example taken from Vervaecke et al. (2007):              ###
##############################################################################
X <- matrix(c(0,58,50,61,32,37,29,39,25,8,0,22,22,9,27,20,10,48,
              3,3,0,19,29,12,13,19,8,5,8,9,0,33,38,35,32,57,
              4,7,9,1,0,28,26,16,23,4,3,0,0,6,0,7,6,12,
              2,0,4,1,4,4,0,5,3,0,2,1,1,5,8,3,0,10,3,1,3,0,0,4,1,2,0),
              nrow=9,byrow=TRUE)

individuals <- c("V","VS","B","FJ","PR","VB","TOR","MU","ZV")

steeptest(X, rep=9999, names=individuals, method="Dij", order=TRUE, option.console=TRUE)

Run the code above in your browser using DataLab