irregular_single_dataset: c/e rates for irregular samplings in a dataset

View source: R/IrregularSamplingTimes.R

irregular_single_datasetR Documentation

c/e rates for irregular samplings in a dataset

Description

irregular_single_dataset estimates colonization and extinction rates in a single dataset with irregular sampling scheme.
NLL_isd returns the Negative Log-Likelihood of a pair of colonization and extinction rates for an irregular sampling scheme in a single dataset.

Usage

irregular_single_dataset(
  dataframe,
  vector,
  c,
  e,
  column = NULL,
  n = NULL,
  step = NULL,
  assembly = FALSE,
  jacobian = FALSE,
  verbose = FALSE,
  CI = FALSE
)

NLL_isd(dataframe, vector, c, e, assembly = FALSE)

Arguments

dataframe

A single dataframe.

vector

A vector indicating the columns with presence-absence data.

c

Tentative colonization rate.

e

Tentative extinction rate.

column

The name of the column with groups to calculate their c_e pair.

n

Minimal number of rows for each group

step

Accuracy to calculate the c_e pairs with.

assembly

Logical indicating if the assembly starts from zero species or not.

jacobian

Logical. Use the semianalytical method to estimate colonization and extinction rates?

verbose

Logical. If TRUE, gives the output of the optimizer or the numerical solver that finds the values of c and e.

CI

Logical. If TRUE, gives the confidence interval of the colonization and extinction rates.

Value

irregular_single_dataset returns a dataframe with colonization and extinction rates and their upper and lower confidence interval, and if needed, the names of the groups to which colonization and extinction rates have been calculated. NLL_isd gives the NLL for a single dataset in an irregular sampling scheme given a specific c and e.

Note

The columns with the presence-absence data should have the day of that sampling on the name of the column in order to calculate colonization and extinction.

See Also

regular_sampling_scheme, irregular_multiple_datasets

Examples

irregular_single_dataset(simberloff[[1]], 3:17, 0.001, 0.001)
irregular_single_dataset(simberloff[[1]], 3:17, column = "Tax. Unit 1",
0.001, 0.001, 3)

irregular_single_dataset(simberloff[[1]], 3:17, column = "Tax. Unit 1",
0.001, 0.001, 3, 0.00001)

NLL_isd(simberloff[[1]], 3:17, 0.0038, 0.0086)

island documentation built on Jan. 23, 2023, 5:30 p.m.