init_biqq: Initiation of Stan Program for BIQQ

Description Usage Arguments Examples

Description

The function takes the model code and data as an argument and returns stan_fit object to use in BIQQ

Usage

1
init_biqq(model_code = NULL, stanmodel = NULL, data)

Arguments

model_code

A character string either containing the model definition or the name of a character string object in the workspace. This parameter is used only if parameter file is not specified. When fit is specified, the model compiled previously is used so specifying model_code is ignored

stanmodel

An object of class stanmodel

data

A named list or environment providing the data for the model, or a character vector for all the names of objects used as data. See the Note section below

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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)

# Print model fit for Natural Resource Curse example
nr_fit

# 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)

# Print model fit for Origins of Electoral Systems example
es_fit

## End(Not run)

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