rstan_rhat: Re-Implement 'rstan::Rhat()'

View source: R/rhat_max.R

rstan_rhatR Documentation

Re-Implement rstan::Rhat()

Description

Internal implementation of rstan::Rhat() to avoid unnecessary dependency.

Usage

rstan_rhat(params)

rstan_rhat_(params)

rstan_split_chains(params)

rstan_z_scale(x)

rstan_is_constant(x, tol = .Machine$double.eps)

Arguments

params

A 2D matrix or array with one row per iteration and one column per chain. The cells are realized draws for a particular parameter or function of parameters.

x

Vector, matrix, or array to scale

Value

rstan_rhat() returns a scalar double that is the max of the bulk and tail (folded) R-hat statistic for params. rstan_rhat_() returns a scalar double R-hat. rstan_split_chains() returns an array with each column split into two columns (top and bottom half). rstan_z_scale() returns the scaled vector/matrix/array.


jesse-smith/futuremice documentation built on Nov. 24, 2023, 7:19 a.m.