run_mcmc: Run the BTUN MCMC algorithm

Description Usage Arguments Value Examples

View source: R/mcmc_functions.R

Description

This function runs the BTUN mcmc algorithm

Usage

1
run_mcmc(n.iter, delta, k.mean, k.chol, win.matrix, f.initial, alpha = FALSE)

Arguments

n.iter

The number of iterations to be run

delta

The underrlaxed tuning parameter must be in (0, 1)

k.mean

The GP prior mean vector

k.chol

The cholesky decomposition of the GP prior covariance matrix

win.matrix

A matrix, where w_ij give the number of times area i beat j

f.initial

A vector of the intial esitmate for f

alpha

A boolean if inference for alpha should be carried out

Value

A list of MCMC output

Examples

1
2
3
4
5
6
7
8
9
n.iter <- 10
delta <- 0.1
k.mean <- c(0, 0, 0)
k.chol <- diag(3)
comparisons <- data.frame("winner" = c(1, 3, 2, 2), "loser" = c(3, 1, 1, 3))
win.matrix <- comparisons_to_matrix(3, comparisons)
f.initial <- c(0, 0, 0)

mcmc.output <- run_mcmc(n.iter, delta, k.mean, k.chol, win.matrix, f.initial)

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