run_gender_mcmc: Run the BTUN with Gender Effect MCMC algorithm

Description Usage Arguments Value Examples

View source: R/mcmc_functions.R

Description

This function runs the BTUN with Gender Effect MCMC algorithm

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
run_gender_mcmc(
  n.iter,
  delta,
  k.mean,
  k.chol,
  male.win.matrix,
  female.win.matrix,
  f.initial,
  g.initial
)

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, alpha must be set to 1 when constructing ths

male.win.matrix

A matrix, where w_ij give the number of times area i beat j when judged by men

female.win.matrix

A matrix, where w_ij give the number of times area i beat j when judged by women

f.initial

A vector of the intial esitmate for f, the male function

g.initial

A vector of the intial esitmate for g, the discrepancy functon

Value

A list of MCMC output

Examples

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

mcmc.output <- run_gender_mcmc(n.iter, delta, k.mean, k.chol, men.win.matrix,
    women.win.matrix, f.initial, g.initial)

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