multivariate_simplex: Multiview Simplex - Do Simplex for Permutations of Lags

View source: R/multivariate_simplex.R

multivariate_simplexR Documentation

Multiview Simplex – Do Simplex for Permutations of Lags

Description

Take a multivariate data set containing variables through time, a response variable (the variable we care about, such as population number), and a set of lags that we wish to consider. Apply Simplex to each subset of lags. Based on ‘multiview_embedding()' which was based on Ye and Sugihara (2016)’s description of that; not sure if anyone has done this approach before (though seems fairly logical to try it).

Usage

multivariate_simplex(data, lags, response = NULL)

Arguments

data

[tibble()] or [data.frame()] with named [numeric()] columns

lags

[list()] of a named vector of lags for each explanatory variable.

response

[character()] column name of the response variable in data

Details

For all allowed lags, this function builds every possible state space reconstruction (Figure 1C in Ye and Sugihara), of all possible dimensions. So variable 1 with 0 lag, variable 1 with 0 lag and variable 2 with 0 lag, variable 1 with 0 lag and variable 2 with 1 lag, etc. up to variable 1 with all lag allowed from 'lags' and variable 2 with all lags allowed from 'lags'. If there are $N$ total variable-lag combinations, then there should be $2^N - 1$ possible reconstructions (each one is either in or out, minus them all being out), but this may get reduced with what is described above.

This function then calls 'pbsEDM_optimal()', for each possible state space reconstruction, which creates the state space reconstruction and makes Simplex predictions for all allowable focal times $t^*$ taking into account which neighbours should be candidates for nearest neighbours, and calculates predicted values of the response variable both scaled and unscaled. Here we will calculate metrics of the fit, based on just the response variable (as that is what we are interested in), and pick the best performing ones - the square root of the total number of reconstructions, as per Y&S for multiview embedding. Then use the average of those to make the actual forecast for the time step after the data.

TODO Also an add option to just use the best Simplex projection. Might be best to do that as default.

Returns **

Value

[list()] **TODO

Author(s)

Andrew M. Edwards


luke-a-rogers/pbsedm documentation built on June 3, 2024, 5:20 a.m.