pstats: Get posterior statistics

Description Usage Arguments Details Value

Description

Calculate posterior statistics from an array or vector of samples. The samples are populated along the last dimension, e.g. columns of a matrix are the samples; the depth of a 3D array are the samples.

Usage

1
2
3
pstats_v4(samples, fun)

pmean_v4(samples)

Arguments

samples

A vector, matrix or array of samples

fun

A function for statitics calculation. Support 'tidy' style of function specification.

Details

'pstats' calculates posterior statistics given by 'fun'.

'pmean' calculates posterior means, and faster than pstats(samples, mean).

Value

A numeric value, vector or matrix


weiyaw/flexss documentation built on June 16, 2021, 7:48 a.m.