abc_coin_flip_game: Simulate many coin flip games via Approximate Bayesian...

Description Usage Arguments Value Examples

View source: R/coin_flip.R

Description

Simulate many coin flip games via Approximate Bayesian Computation

Usage

1
2
abc_coin_flip_game(players, result = seq_along(players), iters = 10000,
  cores = 1L)

Arguments

players

A list of players created with new_player.

result

The final ranking of players in the game. The winner should receive a 1, second place a 2, etc. Set NULL to leave the result open (e.g., to compute win probabilities ahead of a game).

iters

Number of samples to take from the joint distribution (d*, θ*).

cores

Number of cores to use for the computation. The special value cores = -1 uses all the cores (detected by parallel::detectCores).

Value

A bcf_game object.

Examples

1
2
3
4
5
## Not run: 
players <- list(new_player("Tom"), new_player("Bob"))
sim_game <- abc_coin_flip_game(players)

## End(Not run)

tomshafer/bcf documentation built on May 18, 2019, 9:14 p.m.