integrate_edge_KDE: Calculate KDE integral over edges

View source: R/nhpp_functions.R

integrate_edge_KDER Documentation

Calculate KDE integral over edges

Description

Checks the integral of normalized Markov KDE or normalized loess smoothing over edges.

Usage

integrate_edge_KDE(tree.discr, Edge.KDE.list)

Arguments

tree.discr

simmap or phylo object. A discretized tree using the 'discr_Simmap' function.

Edge.KDE.list

list. A list with the normalized KDEs or loess smoothing for each edge.

Value

A numeric value for the integral over all edges.

Author(s)

Sergei Tarasov

Examples

data("hym_kde", "hym_tree")
# Get reference tree.
tree_discr <- discr_Simmap(hym_tree, res = 200)
# Get non-normalized and normalized edge KDE data for mean rates.
Edge_KDE <- hym_kde$head
# Check integrals.
integrate_edge_KDE(tree_discr, Edge_KDE$Maps.mean.norm)
integrate_edge_KDE(tree_discr, Edge_KDE$Maps.mean.loess.norm)


ontophylo documentation built on May 29, 2024, 9:57 a.m.