Skip to contents

Formula: rate = n_divergent / n_total

Usage

Divrate(divergent)

Arguments

divergent

See Usage.

Value

List with count, rate, per_chain, per_chain_rate, any, n.

References

Betancourt (2017), A Conceptual Introduction to Hamiltonian Monte Carlo, arXiv:1701.02434, Section 6.2: divergent transitions are 'extremely sensitive identifiers' of the pathological neighbourhoods a trajectory failed to explore. Verified against the paper.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Divrate(V)
#> $count
#> [1] 8
#> 
#> $rate
#> [1] 1
#> 
#> $per_chain
#> [1] 8
#> 
#> $per_chain_rate
#> [1] 1
#> 
#> $any
#> [1] TRUE
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Divergent transition count and rate"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"