TempDisaggDGP: High and Low-Frequency Data Generating Processes

View source: R/TempDisaggDGP.R

TempDisaggDGPR Documentation

High and Low-Frequency Data Generating Processes

Description

This function generates a high-frequency response vector y, following the relationship y = X\beta + \epsilon, where X is a matrix of indicator series and \beta is a potentially sparse coefficient vector. The low-frequency vector Y is generated by aggregating y according to a specified aggregation method.

Usage

TempDisaggDGP(
  n_l,
  n,
  aggRatio = 4,
  p = 1,
  beta = 1,
  sparsity = 1,
  method = "Chow-Lin",
  aggMat = "sum",
  rho = 0,
  mean_X = 0,
  sd_X = 1,
  sd_e = 1,
  simul = FALSE,
  sparse_option = "random",
  setSeed = 42
)

Arguments

n_l

Integer. Size of the low-frequency series.

n

Integer. Size of the high-frequency series.

aggRatio

Integer. Aggregation ratio between low and high frequency (default is 4).

p

Integer. Number of high-frequency indicator series to include.

beta

Numeric. Value for the positive and negative elements of the coefficient vector.

sparsity

Numeric. Sparsity percentage of the coefficient vector (value between 0 and 1).

method

Character. The DGP of residuals to use ('Denton', 'Denton-Cholette', 'Chow-Lin', 'Fernandez', 'Litterman').

aggMat

Character. Aggregation matrix type ('first', 'sum', 'average', 'last').

rho

Numeric. Residual autocorrelation coefficient (default is 0).

mean_X

Numeric. Mean of the design matrix (default is 0).

sd_X

Numeric. Standard deviation of the design matrix (default is 1).

sd_e

Numeric. Standard deviation of the errors (default is 1).

simul

Logical. If TRUE, the design matrix and the coefficient vector are fixed (default is FALSE).

sparse_option

Character or Integer. Option to specify sparsity in the coefficient vector ('random' or integer value). Default is "random".

setSeed

Integer. Seed value for reproducibility when simul is set to TRUE.

Details

The aggregation ratio (aggRatio) determines the ratio between the low and high-frequency series (e.g., aggRatio = 4 for annual-to-quarterly). If the number of observations n exceeds aggRatio \times n_l, the aggregation matrix will include zero columns for the extrapolated values.

The function supports several data generating processes (DGP) for the residuals, including 'Denton', 'Denton-Cholette', 'Chow-Lin', 'Fernandez', and 'Litterman'. These methods differ in how they generate the high-frequency data and residuals, with optional autocorrelation specified by rho.

Value

A list containing the following components:

  • y_Gen: Generated high-frequency response series (an n \times 1 matrix).

  • Y_Gen: Generated low-frequency response series (an n_l \times 1 matrix).

  • X_Gen: Generated high-frequency indicator series (an n \times p matrix).

  • Beta_Gen: Generated coefficient vector (a p \times 1 matrix).

  • e_Gen: Generated high-frequency residual series (an n \times 1 matrix).

Examples

data <- TempDisaggDGP(n_l=25,n=100,p=10,rho=0.5)
X <- data$X_Gen
Y <- data$Y_Gen

DisaggregateTS documentation built on Oct. 31, 2024, 5:09 p.m.