create_empirical_island: Convert intermediate output to final simulation output for...

View source: R/create_empirical_island.R

create_empirical_islandR Documentation

Convert intermediate output to final simulation output for empirical data

Description

Convert intermediate output to final simulation output for empirical data

Usage

create_empirical_island(total_time, island_tbl, mainland_clade, mainland_spec)

Arguments

total_time

Numeric defining the length of the simulation in time units.

island_tbl

Data frame with current state of simulation containing number of species, see create_test_island_tbl()

mainland_clade

Data frame with state of mainland, see create_test_mainland_clade()

mainland_spec

Numeric focal species on the mainland

Value

a list with these elements:

  1. branching_times, a sorted numeric vector, as required by the ML estimation functions. The first element always refers to the island age. Subsequent elements refer to colonisation, speciation and recolonisation times. The most recent recolonisation time, if any is always omitted to approximate simulation results to the mathematical formulation of the likelihood functions used for MLE.

  2. stac, status of colonist. In this function it can be returned as either 2, 4 or 3. If stac is 2, then there is only one independent colonisation present on the island and the extant species are endemic. If stac is 4, then only a singleton endemic is present at the present. If stac is 3, then recolonisation occurred, and more than one colonising lineage.

  3. missing_species, a numeric value with the number of missing species, that is, species not sampled in the phylogeny but present on the island. As this code only runs for simulation models, here missing_species is always set to 0.

  4. all_colonisations, on recolonising lineages only. It is comprised of ⁠$event_times⁠ and ⁠$species_type⁠:

    ⁠$event_times⁠

    ordered numeric vectors containing all events for each extant recolonising lineage. This includes all colonisation and branching times. Each vector pertains to one colonising lineage.

    ⁠$species_type⁠

    a string. Can be "A", "C" or "I" depending on whether the extant clade is of anagenetic, cladogenetic or immigrant origin, respectively.

Author(s)

Joshua W. Lambert


joshwlambert/DAISIEmainland documentation built on July 14, 2024, 5:40 p.m.