Skip to contents

multiview embedding forecast

Usage

# S4 method for class 'sf'
multiview(
  data,
  column,
  target,
  nvar,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  nb = NULL,
  top = NULL,
  threads = detectThreads(),
  detrend = TRUE
)

# S4 method for class 'SpatRaster'
multiview(
  data,
  column,
  target,
  nvar,
  lib = NULL,
  pred = NULL,
  E = 3,
  tau = 1,
  k = E + 2,
  top = NULL,
  threads = detectThreads(),
  detrend = TRUE
)

Arguments

data

observation data.

column

name of library variable.

target

name of target variable.

nvar

number of variable combinations.

lib

(optional) libraries indices.

pred

(optional) predictions indices.

E

(optional) embedding dimensions.

tau

(optional) step of spatial lags.

k

(optional) number of nearest neighbors used in prediction.

nb

(optional) neighbours list.

top

(optional) number of reconstructions used in MVE forecast.

threads

(optional) number of threads to use.

detrend

(optional) whether to remove the linear trend.

Value

A vector (when input is sf object) or matrix

References

Ye H., and G. Sugihara, 2016. Information leverage in interconnected ecosystems: Overcoming the curse of dimensionality. Science 353:922-925.

Examples

columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
# \donttest{
multiview(columbus,
          column = c("inc","crime","open","plumb","discbd"),
          target = "hoval", nvar = 3)
#>  [1]  18.8646054  22.4869617  21.1550738  -1.1253460  -9.1007114  -2.7903615
#>  [7]  -7.6201012  -6.6613986  -8.7202885  16.2907046 -13.4100870   5.5617166
#> [13]  -4.6242104  -6.0215133 -12.1983725  -9.3303243  14.4441917   2.2055448
#> [19]  -4.3641292  -6.0871013 -11.5193470   2.6235111  13.7585733  -8.7467063
#> [25]  -9.7543853  -4.1516025   3.8137697 -18.6397054 -12.1462767 -12.0658493
#> [31]  10.9218398  19.4799373  -8.1531852  16.5727910   0.7379578   8.5333685
#> [37] -15.5058094 -17.8177107  23.9793164  27.1593848  18.1874514  -2.9723211
#> [43]  -2.8697946  -8.5016198   1.2200571   5.7208429  15.1875343   6.5063233
#> [49]   0.2310141
# }