Function_ComputeDistances_2Networks: Function_ComputeDistances_2Networks: function to compute...

Description Usage Arguments Value Examples

View source: R/Function_ComputeDistances_2Networks.R

Description

This function returns a vector containing the Hellinger and KL distances between two tree models

Usage

1
2
3
4
Function_ComputeDistances_2Networks(
  list.Model_01_Network,
  list.Model_02_Network
)

Arguments

list.Model_01_Network

List containing network model with (1) phylogenetic tree (2) table of migratio flow (3) vector.Z and (4) Sig2 parameter

list.Model_02_Network

List containing network model with (1) phylogenetic tree (2) table of migratio flow (3) vector.Z and (4) Sig2 parameter

Value

vector.Distances Vector containing the distances computed between the two focal tree models

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
################
# Load depends #
################
library(ape)
library(geiger)
library(gaussDiff)
library(BMhyd)

######################################
# Specific list for network model 01 #
######################################
list.Model_01_Network <- list(handle.Phylogeny = handle.SimulatedNetwork$phy,
                              handle.Flow = handle.SimulatedNetwork$phy,
                              vector.Z = rep(0, length(network$phy$tip.label)),
                              numeric.Sig2 = 1)

list.Model_02_Network <- list(handle.Phylogeny = handle.SimulatedNetwork$phy,
                              handle.Flow = handle.SimulatedNetwork$phy,
                              vector.Z = rep(0, length(network$phy$tip.label)),
                              numeric.Sig2 = 2)

#####################
# Compute distances #
#####################
Function_ComputeDistances_2Networks(list.Model_01_Network = list.Model_01_Network,
                                    list.Model_02_Network = list.Model_02_Network)

radamsRHA/PRDATR documentation built on Dec. 25, 2021, 11:44 a.m.