plot_biqq: 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
plot_biqq(fit, title = "", x_fun = function(x) {     x$abcd[, 2] -
  x$abcd[, 1] }, x_name = "ATE", y_fun = function(x) {     x$pi_c },
  y_name = "Assignment propensity for c types",
  object_colors = c("darkcyan", "darkred"), adjust_value = 0.8)

Arguments

fit

Stan model fit object

title

Character string of graph name. Defaults to ""

x_fun

Function which takes extracted posterior as an argument and returns values plotted on x axis

x_name

Character string of x axis statistic name

y_fun

Function which takes extracted posterior as an argument and returns values plotted on y axis

y_name

Character string of y axis statistic name

object_colors

Character vector of length 2. Colors to be used for plotting of posterior draws and scaled density respectively. Defaults to object_colors = c("darkcyan", "darkred")

adjust_value

Scalar. Adjustment of the smoothing bandwidth, the bandwidth used is adjust*bw, where bw is a result of "nrd0" method

Examples

1
2
3
4
5
6
7
## Not run: 
 nr_fit <- init_biqq(model_code = stan_nr, data = data_nr_init)
 nr_example <- biqq_nr(fit = nr_fit, chains = 4, cores = 1)

 plot_biqq(fit = nr_example, title = "Posteriors | Both clues weak")

## End(Not run)

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