generate_multiple_datasets: Generate multiple artificial datasets using STARMA on regular...

Description Usage Arguments Value See Also

View source: R/gen_data_utils.R

Description

This function generates multiple regular grids and simulates time series for each location according to one or more STARMA model specifications.

Usage

1
2
3
4
generate_multiple_datasets(Nsites, Ntimes, mtypes, coef_specs, ncoefs,
  trash = 0, grid.h = ceiling(sqrt(Nsites)),
  grid.w = ceiling(sqrt(Nsites)), init_seed = 1234, mid_seed = NULL,
  sim_seed = NULL)

Arguments

Nsites

A vector containing the number of locations in the regular grids to be generated

Ntimes

A vector containing the number of time series points to be generated for each location

mtypes

A vector of the types of STARMA models to be used for data generation. Should be STAR,STARMA,NL_STAR or STMA.

coef_specs

A named list of coefficient specifications for the models. Each slot in the list should itself contain a named list with slots c_10, c_11, c_20, c_21 containing either a number which will be used directly for the coefficient of that order in the AR and/or the MA components of the model, or a vector specifying an interval whithin which a coefficient will be randomly generated. Coefficients are only randomly generated for the first pair of Nsites and Ntimes, and then are re-used for different grid and time series sizes.

ncoefs

A vector with the number of data sets that should be generated according to each of the specifications in the coef_specs list.

trash

A number of initial time series points to be discarded at each location.

grid.h

Height of the grid (in number of locations). Defaults to sqrt(Nsites).

grid.w

Width of the grid (in number of locations). Defaults to sqrt(Nsites).

init_seed

Seed to set at the begining (before coefficient generation). Default is 1234.

mid_seed

Seed to set between grid/time series size change. Default is NULL.

sim_seed

Seed to feed to generate_one_dataset. Default is NULL.

Value

A list containing a list for each size in Nsites. Each of the sublists contains a list of datasets generated by generate_one_dataset for each time series size specified in Ntimes. Each of these sublists will have sum(length(mtypes) x ncoefs) datasets of each grid and time series size. In total, length(Nsites) x length(Ntimes) x sum(length(mtypes) x ncoefs) spatio-temporal datasets are generated.

See Also

generate_one_dataset


mrfoliveira/Evaluation-procedures-for-forecasting-with-spatio-temporal-data documentation built on April 11, 2021, 10:50 a.m.