At the end of the worked-out example 1, it shows two different nLTT lines: (1) the 'true' nLTT line, and (2) the average posterior nLTT line. The nLTT statistic equals the surface between these two lines.
Too bad, nLTT::nLTTstat cannot be used here, as it takes two phylogenies as its inputs.
What can be done is the obtain the ribir::get_nltt_values for both 'true' phylogeny and average posterior and subtract these.
t
nLTT true
nLTT average posterioir
absolute difference
0.0
0.1
0.2
0.1
0.1
0.2
0.3
0.1
0.2
0.3
0.5
0.2
0.3
0.5
0.6
0.1
The sum of the absolute differences is the nLTT stat.
Write a function called get_nltt_stat, like
#' Obtain the nLTT statistic between the average of phylogenies_a and the average of phylogenies_b
get_nltt_stat <- function(phylogenies_a, phylogenies_b) {
}
Test that it results in 0.0 for equal phylogenies.
At the end of the worked-out example 1, it shows two different nLTT lines: (1) the 'true' nLTT line, and (2) the average posterior nLTT line. The nLTT statistic equals the surface between these two lines.
Too bad, nLTT::nLTTstat cannot be used here, as it takes two phylogenies as its inputs.
What can be done is the obtain the
ribir::get_nltt_values
for both 'true' phylogeny and average posterior and subtract these.The sum of the absolute differences is the nLTT stat.
Write a function called
get_nltt_stat
, likeTest that it results in
0.0
for equal phylogenies.Write a vignette that demonstrates this.