TS_sample: Time Series Sample-Generator

Description Usage Arguments Details Value

View source: R/TS_sample.R

Description

Time Series Sample-Generator

Usage

1
2
TS_sample(TS_key = "WNG", N = 500, nr_samples = 1, ..., .seed = NULL,
  .kind_vstr_list = NULL)

Arguments

TS_key

A key, i.e. a character, corresponding to an element in TS_families. Default value WNG, i.e. "White Noise Gaussian".

N

The desired length of the time series. Default value 500.

nr_samples

The desired number of independent samples to be produced. The default value 1 is the one to use when testing for the effect of different settings for bootstrapping, whereas (much) higher values is intented to be used to get an idea about what the true behaviour should be when investigating the Local Gaussian Spectral Density.

...

dotsMethods-strategy for feeding parameters to the function (identified by TS_key that generates the time series.

.seed

Use this to enable reproducible results. Default value NULL (it will be generated and recorded in the code).

.kind_vstr_list

This can be used to create a list with the values for kind, normal.kind and vstr. (See the help-page of Random for details about these three arguments.) Note that the default value NULL will imply that the function set_seed will be used to create the required list based on the present settings.

Details

This function will create one or more time series based on the "keys" stored in TS_families, with emphasis on also storing the required arguments needed in order to recreate it later on.

Value

This function returns a list with four parts TS, TS_data, spy_report and seed_vec. TS contains an array with the time series generated according to the specified arguments, whereas TS_data includes some additional stuff that will be used when TS_LG_object takes care of the saving of the data. The arguments needed in order to redo the computation later on is stored in spy_report. The part seed_vec reflects that the internal workings of the code creates a vector of seeds (based on .seed that then can be used to create an individual series later on (this is of course only of interest when nr_samples is larger than one, and we for some reason later on would like to do an in depth analysis of one of the resulting time series.


LAJordanger/localgaussSpec documentation built on July 28, 2017, 12:15 a.m.