fit_IPD_mcmc: Fit a finite mixture model using MCMC.

View source: R/fit_IPD_hmc.R

fit_IPD_mcmcR Documentation

Fit a finite mixture model using MCMC.

Description

Fit a finite mixture model using MCMC.

Usage

fit_IPD_mcmc(
  d,
  covariates = NULL,
  n_strategies = 12,
  eta_moves = 4,
  eta_arb = 4,
  n_chains = 1,
  n_cores = 1,
  iterations = 1000,
  warmup = 500,
  adapt_delta = 0.95,
  max_treedepth = 12
)

Arguments

d

A data list of the format exported by simulate_round_robin().

covariates

A matrix of covariates. Row number should equal the number of players.

n_strategies

The number of considered strategies. PrisonR considers 12 by default. Changing this requires advanced editing of the Stan code. Good luck!

eta_moves

A term that controls the plausibility of implementation errors.

eta_arb

A term that controls the plausibility of implementation errors.

n_chains

Number of MCMC chains.

n_cores

Number of cores to use.

iterations

Total number of MCMC iterations.

warmup

Warmup iterations: "warmup" must be < "iterations".

adapt_delta

A term that controls MCMC proposal acceptance rate.

max_treedepth

A term that controls the MCMC treedepth.

Value

A Stan object.


ctross/PrisonR documentation built on July 1, 2024, 11:23 p.m.