extractMemoryFeatures: Extracts ecological memory features on the output of...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/extractMemoryFeatures.R

Description

It computes the following features of the ecological memory patterns returned by computeMemory:

Usage

1
2
3
4
5
6
7
extractMemoryFeatures(
 memory.pattern = NULL,
 exogenous.component = NULL,
 endogenous.component = NULL,
 sampling.subset = NULL,
 scale.strength = TRUE
 )

Arguments

memory.pattern

either a list resulting from computeMemory, or a dataframe with memory patterns of several taxa generated by experimentToTable.

exogenous.component

character string or vector of character strings, name of the variable or variables defining the exogenous component.

endogenous.component

character string, string, name of the variable defining the endogenous component. If the data was generated by prepareLaggedData, endogenous.component would usually be "Response".

sampling.subset

only relevant when analysis.output is the result of runExperiment. Character string with the name of the column of the list with the simulation outcomes.

scale.strength

boolean. If TRUE, the strength of the ecological memory components, which has the same units as the importance scores yielded by Random Forest (percentage of increment in mean squared error when a variable is permuted), is scaled between 0 and 1.

Details

Warning: this function only works when only one exogenous component (driver) is used to define the model in computeMemory. If more than one driver is provided throught the argument exogenous.component, the maximum importance scores of all exogenous variables is considered. In other words, the importance of exogenous variables is not additive.

Value

A dataframe with 8 columns and 1 row if memory.pattern is the output of computeMemory and 13 columns and as many rows as taxa are in the input if it is the output of experimentToTable. The columns are:

Author(s)

Blas M. Benito <blasbenito@gmail.com>

See Also

computeMemory

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#loading example data
data(palaeodataMemory)

#computing ecological memory features
memory.features <- extractMemoryFeatures(
  memory.pattern = palaeodataMemory,
  exogenous.component = c(
  "climate.temperatureAverage",
  "climate.rainfallAverage"
  ),
  endogenous.component = "Response",
  sampling.subset = NULL,
  scale.strength = TRUE
  )

BlasBenito/memoria documentation built on Feb. 20, 2022, 1:45 a.m.