extractMemoryFeatures {memoria} | R Documentation |
Extracts ecological memory features on the output of computeMemory
.
Description
It computes the following features of the ecological memory patterns returned by computeMemory
:
-
memory strength
maximum difference in relative importance between each component (endogenous, exogenous, and concurrent) and the median of the random component. This is computed for exogenous, endogenous, and concurrent effect. -
memory length
proportion of lags over which the importance of a memory component is above the median of the random component. This is only computed for endogenous and exogenous memory. -
dominance
proportion of the lags above the median of the random term over which a memory component has a higher importance than the other component. This is only computed for endogenous and exogenous memory.
Usage
extractMemoryFeatures(
memory.pattern = NULL,
exogenous.component = NULL,
endogenous.component = NULL,
sampling.subset = NULL,
scale.strength = TRUE
)
Arguments
memory.pattern |
either a list resulting from |
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 |
sampling.subset |
only relevant when |
scale.strength |
boolean. If |
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:
-
label character string to identify the taxon. It either inherits its values from
experimentToTable
, or sets the default ID as "1". -
strength.endogenous numeric in the range [0, 100], in importance units (percentage of increment in the mean squared error of the random forest model if the variable is permuted) difference between the maximum importance of the endogenous component at any lag and the median of the random component (see details in
computeMemory
) -
strength.exogenous numeric in the range [0, 100], same as above, but for the exogenous component.
-
strenght.concurrent numeric in the range [0, 100], same as above, but for the concurrent component (driver at lag 0).
-
length.endogenous numeric in the range [0, 100], proportion of lags over which the importance of the endogenous memory component is above the median of the random component.
-
length.exogenous numeric in the range [0, 1], same as above but for the exogenous memory component.
-
dominance.endogenous numeric in the range [0, 1], proportion of the lags above the median of the random term over which a the endogenous memory component has a higher importance than the exogenous component.
-
dominance.exogenous, opposite as above.
-
maximum.age, numeric. As every column after this one, only provided if
memory.pattern
is the output ofexperimentToTable
. Trait of the given taxon. -
fecundity numeric, trait of the given taxon.
-
niche.A.mean numeric, trait of the given taxon.
-
niche.A.sd numeric, trait of the given taxon.
-
sampling numeric, trait of the given taxon.
Author(s)
Blas M. Benito <blasbenito@gmail.com>
See Also
Examples
#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
)