biqq_nr: BIQQ Model for Natural Resource Curse Example

Description Usage Arguments Examples

Description

Fit BIQQ Model for Natural Resource Curse Example

Usage

1
2
3
4
5
6
biqq_nr(fit = NULL, XYKK = c(61, 6, 64, 1, 1, 3),
  alpha_prior = rep(1, times = 4), pi_alpha = rep(1, times = 4),
  pi_beta = rep(1, times = 4), q1bd1_alpha = c(1, 1),
  q1bd1_beta = c(1, 1), q2bd1_alpha = c(1, 1), q2bd1_beta = c(1, 1),
  iter = 20000, chains = 4, warmup = 5000, seed = 1000,
  cores = 1)

Arguments

fit

Stan model fit object

XYKK

XYKK data for model fitting

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)

q1bd1_alpha

Numeric vector of length 2. Alpha shape parameters for Beta distribution of probabilities of observing first clue given that type is (b)eneficial or (d)estinied. Defaults to c(1,1)

q1bd1_beta

Numeric vector of length 2. Beta shape parameters for Beta distribution of probabilities of observing first clue given that type is (b)eneficial or (d)estinied. Defaults to c(1,1)

q2bd1_alpha

Numeric vector of length 2. Alpha shape parameters for Beta distribution of probabilities of observing second clue given that type is (b)eneficial or (d)estinied. Defaults to c(1,1)

q2bd1_beta

Numeric vector of length 2. Beta shape parameters for Beta distribution of probabilities of observing second clue given that type is (b)eneficial or (d)estinied. Defaults to c(1,1)

iter

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

chains

Integer. Number of MC chains. Defaults to 4

warmup

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

seed

Integer. Number for random number generation. Defaults to 1000

cores

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

Examples

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

library(biqq)

# Create model fit for Natural Resource Curse example using init_biqq function
nr_fit <-
  init_biqq(model_code = stan_nr,
            data = data_nr_init)

# Fit the model for Natural Resource Curse example
biqq_nr(fit = nr_fit)

## End(Not run)

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