TS_key_dmt: "Local trigonometric" samples based on cosine-functions

View source: R/TS_key_dmt.R

TS_key_dmtR Documentation

"Local trigonometric" samples based on cosine-functions

Description

The TS_key_dmt-function can create a sample where different trigonometric functions live at separate levels. The purpose of this function is to provide examples that can be used to sanity test the code used to inspect the local Gaussian spectral densities.

Usage

TS_key_dmt(
  n,
  A,
  delta,
  delta_range = NULL,
  alpha,
  theta = NULL,
  wn = list(type = "rnorm", args = list(mean = 0, sd = 1), adjust = 0),
  seed = NULL
)

Arguments

n

The number of samples to create.

A

A matrix whose first row should be the positions and second row should be the probabilities of getting there. The cases of main interest to investigate is the case where this describes a process having expectation 0.

delta

Either a single number, or a vector whose length equals the number of columns in A. This will be used as the amplitudes for the cosine-terms.

delta_range

Either NULL (the default) or a vector similar to delta. When this is different from NULL the effect will be that the values for the deltas will be sampled uniformly based on the intervals that the corresponding components of delta and delta_range span.

alpha

Either a single number, or a vector whose length equals the number of columns in A. This will be used as the frequencies in the cosine-terms.

theta

Either a single number, or a vector whose length equals the number of columns in A. This will be used as the phase in the cosine-terms. The default value NULL will trigger a procedure that draws these numbers uniformly between 0 and 2pi.

wn

A list that specifies how to sample from some distribution. The default is to use standard normal white noise. Note: It is assumed that this should be white noise, but there's no test that prevents a user from selecting something different. The value NULL can be used to set this term to zero.

seed

An integer to be used for the specification of a seed, the default value NULL will trigger a seed to be selected at random.

Value

A sample of length n based on the specifications given in the other arguments

Note

This internal function has been added to the TS_families-list, and its arguments should thus be given to TS_sample, which will send them to this function by the internal helper-function TS_sample_helper.


LAJordanger/localgaussSpec documentation built on May 6, 2023, 4:31 a.m.