ess_value: Estimated Sample Size

Description Usage Arguments Value Examples

View source: R/removal_tree_sampling_aux.R

Description

Returns the estimated number of independent samples based on the weights, using Rényi's entropy: \frac{1}{∑_i w_i^2}.

Usage

1

Arguments

weights

a vector of weight values associated to the sampled trajectories

log

boolean, TRUE if log weights are provided

Value

a number

Examples

1
ess_value(weights=c(3,0,456,1,0,0,5,57), log=FALSE)

JasmineGamblin/bdTreeSim documentation built on Nov. 11, 2019, 6:28 a.m.