README.md

BTUN

THIS IS A ANONYMISED PACKAGE FOR REVIEW PURPOSES ONLY

Bradley--Terry for Urban Networks

The BTUN R package allows you to fit a spatial Bradley--Terry model to comparative judgement data sets. The aim is to estimate the deprivation levels in urban areas and find the most deprived citizens. The BTUN model creates a network from the urban area and uses a Gaussian Process to nonparametrically model the deprivation levels.

Installation

You can install BTUN by calling the following commands:

install.packages('devtools')
devtools::install_github("rowlandseymour/BTUN", dependencies = TRUE)
# devtools::install_github("rowlandseymour/BTUN") #for a quicker install

Creating a Network from an Urban Area

The first step is to create a network from the urban area.Here's an example of a network made from Local Authority Areas in the England: England Map and Network (BTUN) There are two ways to do this in BTUN. The first is to construct an adjacency matrix, which describes which areas are neighbours. This can then be fed into registered_adjacent_covariance_function. The second way is to use coordinates which can be used withregistered_covariance_matrix. This uses the Euclidean distance metric.

Fitting the Model

The BTUN package uses MCMC the estimate the model parameters. The MCMC can be run by calling the run_mcmc function. This make take some time, up to a few hours, depending on how many subdivisions there are in the urban area. Here are the results of the method applied to a comparative judgement data set in Tanzania:

Deprivation in Dar es Salaam, Tanzania (BTUN)

Data

In the package, there is a comparative judgement data set collected in Dar es Salaam, Tanzania. It includes over 75,000 comparisons, where citizens where are to compare subwards in the city based on deprivation. Also included are shapefiles for the 452 subwards. These can be accessed by calling data(dar.comparisons, package = "BTUN") and data(dar.shapefiles, package = "BTUN").

There is also code for simulating comparative judgement data given the underlying levels of deprivation. More information can be found by calling ?BTUN::simulate_contests

Acknowledgements



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