lk_ratio_prune: Likelihood ratio for prune.

View source: R/prune_ratio.R

lk_ratio_pruneR Documentation

Likelihood ratio for prune.

Description

Likelihood ratio of the candidate tree and the previous tree, given that the action step was a prune.

Usage

lk_ratio_prune(old_tree, tree, current_node, pars, nodes_to_prune)

Arguments

old_tree

The previous tree.

tree

The current tree.

current_node

The current pruned node.

pars

The full list of parameters.

nodes_to_prune

The nodes to prune.

Details

For the likelihood ratio of the new pruned tree, we need to calculate an inversion of the one in the grow version. The value is based on the likelihood of all regions, given the tree and the parameters, for the new and the previous trees.

Value

The likelihood ratio.

Author(s)

Bruna Wundervald, brunadaviesw@gmail.com.


brunaw/hebart documentation built on June 1, 2022, 8:35 p.m.