generate_one_dataset: Generate an artificial dataset using STARMA on a regular grid

Description Usage Arguments Value

View source: R/gen_data_utils.R

Description

This function generates a regular grid and simulates a time series for each location according to a STARMA model specification.

Usage

1
2
3
generate_one_dataset(Nsites, Ntimes, coef_spec, gen_coef = TRUE,
  mtype = NULL, trash = 0, ndigits = 3, seed = NULL,
  grid.h = ceiling(sqrt(Nsites)), grid.w = ceiling(sqrt(Nsites)))

Arguments

Nsites

Number of locations in the grid

Ntimes

Number of points in each time series to generate

coef_spec

Coefficient specifications. Should be 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.

gen_coef

A Boolean indicating whether coef_spec should be used to generate coefficients (TRUE: default) or whether coef_spec already contains a proper list of coefficients

mtype

Type of STARMA model (should only be provided if gen_coef is TRUE. One of STAR,STARMA,NL_STAR or STMA.

trash

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

ndigits

Number of digits to keep when rounding coefficients.

seed

Seed to feed to generate_stdata. Default is NULL.

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)

Value

A list with three slots: data, a matrix of spatio-temporal data (columns correspond to locations, rows to time-stamps); coef, a vector of the coefficients actually used to generate the data; and grid, a list containing the positions of location and the neighbour matrices.

@seealso generate_stdata, generate_coef, generate_grid


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