metropolis_condbern: Metropolis algorithm targeting the Conditional Bernoulli...

Description Usage Arguments Value

View source: R/metropolis_condbern.R

Description

This is an approximation of idcheck_sampling. Given the current state x, it proposes to switch a randomly chosen 1 with a randomly chosen 0.

Usage

1
metropolis_condbern(sum_x, alpha, num_sample = 10, save_history = FALSE)

Arguments

sum_x

sum of the samples

alpha

vector of probabilities, length N

config

list of configurations, save_history, num_sample

Value

either xx (a vector of size N) or xx_matrix (a binary matrix of size num_samples by N)


nianqiaoju/agents documentation built on Feb. 19, 2021, 12:18 a.m.