Compute functions of matrices from samples of a stanfit object
stan_postcalc(
stanfit,
object,
calc = "object",
objectindices = "all",
summary = TRUE
)
matrix of values of the specified interactions at each iteration.
object of class stanfit.
name of stan sub object from stanfit to use for calculations.
string containing R calculation to evaluate, with the string 'object' in place of the actual object name.
matrix of indices, with the number of columns matching
the number of dimensions of the object. 'all' computes which( array(1,objdims)==1,arr.ind=TRUE)
,
where objdims is what would be returned by dim(object) if the object existed in the R environment.
if FALSE, a iterations * parameters matrix is returned, if TRUE, rstan::monitor is first run on the output.