gibbs: Estimate a gibbs sampler

Description Usage Arguments Details Value

View source: R/gibbs.R

Description

Estimate a gibbs sampler

Usage

1
2
3
gibbs(formula, data, formulaMun, dataMun, munCol = j, zCol = Z,
  yearCol = year, prior = normal_prior(), nSamples = 1000,
  nChains = 1, parallel = F, cl = NULL)

Arguments

formula

formula for the main model

data

data.frame for the main model

formulaMun

formula for the municipalities model

dataMun

data.frame for the municipalities model

munCol

column in both data and dataMun containing the municipality id, syntax as in dplyr

zCol

column in both data and dataMun containing the (possibly missing) municipality type, syntax as in dplyr

prior

call to normal_prior to specify the prior

nSamples

number of samples to be drawn per chain

nChains

number of chains to be drawn

parallel

should estimation of the chains be parallelized? if TRUE, the cl argument shoud not be NULL

cl

cluster used for parallelization

Details

Make sure to check the methods man page to see related methods, as well as the posteriorprobs man page for how to deal with predicted probabilities.

Value

a gibbs object with (among others) the following components:

estimates

an estimates object of length nChains.


rferrali/rogali documentation built on May 26, 2019, 7 p.m.