biqq_es: BIQQ Model for Origins of Electoral Systems Example

Description Usage Arguments Examples

Description

Fit BIQQ Model for Origins of Electoral Systems Example

Usage

1
2
3
4
5
6
biqq_es(fit = NULL, XY = rep(1, times = 4), XYK = rep(1, times = 8),
  alpha_prior = rep(1, times = 4), pi_alpha = rep(1, times = 4),
  pi_beta = rep(1, times = 4), q0_alpha = rep(1, times = 4),
  q0_beta = rep(1, times = 4), q1_alpha = rep(1, times = 4),
  q1_beta = rep(1, times = 4), iter = 20000, chains = 2, cores = 1,
  warmup = 5000)

Arguments

fit

Stan model fit object

XY

XY data for model fitting (clues not sought)

XYK

XYK data for model fitting (clues sought)

alpha_prior

Numeric vector of length 4. Dirichlet distribution parameters for proportions of 4 possible types in the population. Defaults to c(1,1,1,1)

pi_alpha

Numeric vector of length 4. Alpha shape parameters for Beta distribution of probabilities of assignment for 4 possible types in the population. Defaults to c(1,1,1,1)

pi_beta

Numeric vector of length 4. Beta shape parameters for Beta distribution of probabilities of assignment for 4 possible types in the population. Defaults to c(1,1,1,1)

q0_alpha

Numeric vector of length 4. Alpha shape parameters for Beta distribution of probabilities of not observing clue given that it was sought and any of four possible types. Defaults to c(1,1,1,1)

q0_beta

Numeric vector of length 4. Beta shape parameters for Beta distribution of probabilities of not observing clue given that it was sought and any of four possible types. Defaults to c(1,1,1,1)

q1_alpha

Numeric vector of length 4. Alpha shape parameters for Beta distribution of probabilities of observing clue given that it was sought and any of four possible types. Defaults to c(1,1,1,1)

q1_beta

Numeric vector of length 4. Beta shape parameters for Beta distribution of probabilities of observing clue given that it was sought and any of four possible types. Defaults to c(1,1,1,1)

iter

Integer. Total number of iterations in each chain. Defaults to 20000,

chains

Integer. Number of MC chains. Defaults to 2

cores

Integer. Number of cores to use for parallel computation. Defaults to 1

warmup

Integer. Number of warm-up iterations in each chain. Defaults to 5000

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

library(biqq)

# Create model fit for Origins of Electoral Systems example using init_biqq function
es_fit <-
  init_biqq(model_code = stan_es,
            data = data_es_init)

# Fit the model for Origins of Electoral Systems example
biqq_es(fit = es_fit)

## End(Not run)

macartan/biqq documentation built on May 6, 2019, 6:03 p.m.