block.cv: STARX: spatiotemporal autoregressive model with exogenous...

Description Usage Arguments Value

View source: R/block.cv.R

Description

This function generates testing sets for blockwise cross-validation in spatiotemporal data analysis.

Usage

1
block.cv(locations, nblock.x, nblock.y, nblock.t, nfold)

Arguments

locations

A matrix with three columns stores the locations of data points. The first two columns are spatial locations.

nblock.x

Number of bins in x-dimension.

nblock.y

Number of bins in y-dimension.

nblock.t

Number of bins in t-dimension. The total number of blocks is equal to nblock.x * nblock.y * nblock.t

nfold

Number of folds in cross-validation.

Value

Fold

A list of length nfold. Each list contains the index of data points in the testing set.


funstatpackages/STARX documentation built on Jan. 30, 2021, 11:47 p.m.