SimpleSimulationVLtimeseries {VLTimeCausality}R Documentation

SimpleSimulationVLtimeseries

Description

SimpleSimulationVLtimeseries is a support function for generating time series X,Y where X VL-Granger-causes Y.

Usage

SimpleSimulationVLtimeseries(
  n = 200,
  lag = 5,
  YstFixInx = 110,
  YfnFixInx = 170,
  XpointFixInx = 100,
  arimaFlag = TRUE,
  seedVal = -1,
  expflag = FALSE,
  causalFlag = TRUE
)

Arguments

n

is length of time series.

lag

is a time lag between X and Y s.t. Y[t] is approximately X[t-lag].

YstFixInx

is the starting point of variable lag part.

YfnFixInx

is the end point of variable lag part.

XpointFixInx

is a point in X s.t. Y[YstFixInx:YfnFixInx]= X[XpointFixInx] .

arimaFlag

is ARMA model flag. If it is true, then X is generated by ARMA model. If it is false, then X is generated by sampling of the standard normal distribution.

seedVal

is a seed parameter for generating random noise. If it is not -1, then the rnorm is set the random seed with seedVal.

expflag

is the flag to set the relation between Y[i+lag] and X[i]. If it is false Y,X has a linear relation, otherwise, they have an exponential relation.

causalFlag

is a flag. If it is true, then X causes Y. Otherwise, X,Y have no causal relation.

Value

This function returns a list of time series X,Y where X VL-Granger-causes Y.

Examples

# Generate simulation data
TS <- SimpleSimulationVLtimeseries()


[Package VLTimeCausality version 0.1.4 Index]