simulate_comparisons: Simulate contests from the Bradley-Terry Model

Description Usage Arguments Value Examples

View source: R/simulate_contests.R

Description

This function simulates pair-wise contests according to the Bradley–Terry model

Usage

1
simulate_comparisons(n.contests, true.quality, sigma.obs)

Arguments

n.contests

The number of contests to be carried out

true.quality

A vector with the level of deprivation in each area on the log scale.

sigma.obs

Standard deviation for the noise to be added to the level of deprivation in each subward. If 0, no noise is used.

Value

A list containing a data.frame with each par-wise contest and the outcome, and a win matrix where the i,j^th element is the number of times i beat j

Examples

1
2
example.deprivation <- -2:2 #True level of deprivation in each area
example.comparisons <- simulate_comparisons(10, example.deprivation, 0) #generate comparisons

jasa-btun-anon/BTUN documentation built on Sept. 12, 2020, 12:54 a.m.