normalize_KDE {ontophylo}R Documentation

Normalize loess smoothing

Description

Normalizes the loess smoothing for the Markov KDE.

Usage

normalize_KDE(tree.discr, Maps.mean.loess)

Arguments

tree.discr

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

Maps.mean.loess

list. A list with the loess smoothing calculated for each edge using the 'loess_smoothing_KDE' function.

Value

A list with the normalized loess smoothing calculated for each edge.

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.
Edge_KDE <- hym_kde$head
# Calculate smoothing of edge KDE data.
Edge_KDE$Maps.mean.loess <- suppressWarnings(loess_smoothing_KDE(tree_discr, Edge_KDE))
# Normalize smoothing edge KDE data.
Edge_KDE$Maps.mean.loess.norm <- normalize_KDE(tree_discr, Edge_KDE$Maps.mean.loess)
# Check smoothing of KDE data for non-normalized mean rates from an arbitrary branch.
Edge_KDE$Maps.mean.loess[[5]]


[Package ontophylo version 1.1.3 Index]