GelmanDiag: Extract Gelman-Rubin diagnostics as data frame

Description Usage Arguments Value Examples

Description

Extract Gelman-Rubin diagnostics as data frame

Usage

1
GelmanDiag(obj, iter)

Arguments

obj

model object from zoib where one.inflation = FALSE and joint = FALSE.

iter

integer. The number of iterations.

Value

data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
Load packages
library(zoib)
library(zibHelpers)

# Run example of clustered zero-inflated beta regression from
# Liu and Kong (under review, 12-14)

# Load data
data("AlcoholUse", package = "zoib")
AlcoholUse$Grade <- as.factor(AlcoholUse$Grade)

nIter = 50 # Number of iterations, including burn-in

# Estimate
Out <- zoib(Percentage ~ Grade + Days + Gender|1|Grade + Days + Gender|1,
            data = AlcoholUse, random = 1, EUID = AlcoholUse$County,
            zero.inflation = TRUE, one.inflation = FALSE, joint = FALSE,
            n.iter = nIter)

# Gelman-Rubin diagnostics
GelmanDiag(Out, nIter)

## End(Not run)

christophergandrud/zibHelpers documentation built on May 13, 2019, 7:04 p.m.