# simulateDSFM1D: Simulate Responses for One-Dimensional Factor Models In MarcGumowski/dysefamor: Estimation Algorithm of Dynamic Semiparametric Factor Model

## Description

This function simulates responses for one-dimensional factor models.

## Usage

 1 2 simulateDSFM1D(model = "ns", n = 100, x1 = 1:30, L = 3, var = 5e-04, beta = c(0.065, -0.015, 0.05), tau = c(0.5, 6)) 

## Arguments

 model the type of model to be generated. To choose between "ns" and "dsfm". n the number of observations. x1 a vector of covariates. L the number of factors for the DSFM. var the error \varepsilon_{t,j} of the models. Allows to control the noise. beta a vector of dimension (1x3) controlling the starting values of the VAR(1) process. tau a vector of dimension (1x2) specifying the parameters Τ_1 and Τ_2 of the Extended Nelson-Siegel model. These parameters are constant.

## Details

Two different way of generating data are available: using an Extended Nelson-Siegel model following Bliss (1997) "ns" with a predefined VAR(1) process, or a Dynamic Semiparametric Factor Model "dsfm" with predefined factors functions. This function is used for example purpose, only few parameters are available to control the simulation.

The starting values to simulate the Extended Nelson-Siegel model are taken following Linton and al. (2001).

The factors loadings of the DSFM are simulated from three independant AR(1) process and the factors functions are predefined to be orthogonals.

## Value

simulateDSFM1D returns a list containing:

 dataSim an object of class "DSFM1DData", output of the DSFM1DData function. This object can be immediatly used by the DSFM algorithm. YSim the simulated data in a more usual format. Z_tl the simulated factor loadings. x1 the vector of the covariates.

Depending on the model simulated, the functions returns also:

 m_l the factors functions used to compute the DSFM. tau the constant Τ_1 and Τ_2 used to compute the Extended Nelson-Siegel model.

## References

Linton, Oliver et al. (2001). "Yield Curve Estimation by Kernel Smoothing Methods". In: Journal of Econometrics 105.1, pp. 185-223.

Bliss, Robert R.(1997). "Testing Term Structure Estimation Methods". In: Advances in Futures and Options Research 9, pp. 197-231.

DSFM1DData, DSFM, DSFM1D.