bad: Returns parameters from a Stan object which are not converged

Description Usage Arguments Author(s) Examples

View source: R/bad.R

Description

Returns the parameters from a Stan object which are not converged, based on Rhat.

Usage

1
bad(fit, r.hat.level = 1.2, plot = FALSE)

Arguments

fit

Model object from Stan

r.hat.level

Argument controling the level for Rhat. Defaults to 1.2

plot

Display trace plots of these parameters. (not working)

Author(s)

Michael J. Dodrill, mdodrill@usgs.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(rstan)
scode <- "
parameters {
real y[2];
}
model {
y[1] ~ normal(0, 1);
y[2] ~ double_exponential(0, 2);
}
"
fit <- stan(model_code = scode, iter = 10, verbose = FALSE)
bad(fit)

## End(Not run)

mdodrill-usgs/fishR documentation built on Oct. 29, 2019, 8:48 p.m.