Alt
The birth_rate (speciation) parameter = 0.296. The death_rate (extinction) parameter = 0.214
This model is a useful initial screening for the historical diversification of a group but does not account for many factors.This model does not take into account critical factors for speciation and extinction including parameters shifting with time. This is covered by the Diversification Rate Estimation model.
I made my tree in FigTree
The estimated ancestral state is Type/Character/Trait 1 with a posterior probability of 0.9878
library(coda)
## Warning: package 'coda' was built under R version 3.4.3
library(ggplot2)
source("C:/Users/perez/Desktop/lab_files/scripts/multiplot.R")
name <- "activity_period"
data <- read.table(paste0("C:/Users/perez/Desktop/lab_files/output/primates_BiSSE_",name,".log"),header=TRUE)
dat_ext <- data.frame(dens = c(data$extinction.1, data$extinction.2),
Type = rep(c("1", "2"), each = length(data$extinction.1)))
dat_spec <- data.frame(dens = c(data$speciation.1, data$speciation.2),
Type = rep(c("1", "2"), each = length(data$extinction.1)))
dat_div <- data.frame(dens = c(data$speciation.1-data$extinction.1, data$speciation.2-data$extinction.2),
Type = rep(c("1", "2"), each = length(data$extinction.1)))
dat_rel <- data.frame(dens = c(data$extinction.1/data$speciation.1, data$extinction.2/data$speciation.2),
Type = rep(c("1", "2"), each = length(data$extinction.1)))
pdf(paste0("RevBayes_BiSSE_Results_",name,".pdf"))
p1 <- ggplot(dat_spec, aes(x = dens, fill = Type)) +
labs(title = "Speciation", x="Rate", y="Posterior Density") +
geom_density(alpha = 0.5)
p2 <- ggplot(dat_ext, aes(x = dens, fill = Type)) +
labs(title = "Extinction", x="Rate", y="Posterior Density") +
geom_density(alpha = 0.5)
p3 <- ggplot(dat_div, aes(x = dens, fill = Type)) +
labs(title = "Net-Diversification", x="Rate", y="Posterior Density") +
geom_density(alpha = 0.5)
p4 <- ggplot(dat_rel, aes(x = dens, fill = Type)) +
labs(title = "Relative Extinction", x="Rate", y="Posterior Density") +
geom_density(alpha = 0.5)
multiplot(p1, p2, p3, p4)
The rate states are dependent since the rates differ significantly between type 1 and type 2 as seen in the net-diversification analysis. The differential rate means the trait has some selective significance in evolutionary history for speciation for type 1 species. Extinction rates are somewhat similar, so speciation plays a larger role in this shift.