View source: R/dynamicWhittle_prior_and_mcmc_params.R
| sim_tvarma12 | R Documentation | 
simulate from the tvARMA(1,2) process for illustration
sim_tvarma12(
  len_d,
  dgp = NULL,
  ar_order = 1,
  ma_order = 2,
  a1 = NULL,
  b1 = NULL,
  b2 = NULL,
  innov_distribution = NULL,
  wn = NULL
)
| len_d | a positive integer indicating the length of the simulated process. | 
| dgp | optional: the tv-ARMA models demonstrated in section 4.2 of Tang et al. (2023). Should be chosen from "LS1", "LS2" and "LS3". See section Details. | 
| ar_order,ma_order,a1,b1,b2 | If dgp is not supplied, these arguments can be used to specify customized tv-ARMA process (up to order(1,2)). See details. | 
| innov_distribution | optional: the distributions of innovation used in section 4.2.2 of Tang et al. (2023) . Should be chosen from "a", "b", "c". "a" denotes standard normal distribution, "b" indicates standardized Student-t distribution with degrees of freedom 4 and "c" denotes standardized Pareto distribution with scale 1 and shape 4. | 
| wn | If innov_distribution is not specified, one may supply its own innovation sequence. Please make sure the length of wn is at least the sum of len_d and the MA order of the process. If ma_order is specified, then MA order is exactly ma_order. If dgp is specified, the MA order of "LS1", "LS2" and "LS3" can be found in section Details below. | 
This function simulates from the following time-varying Autoregressive Moving Average model with order (1,2):
where T is the length specified and {wt} are 
a sequence of i.i.d. random variables with mean 0 and standard deviation 1.
For dgp = "LS1", it is a tvMA(2) process (MA order is 2) with
For dgp = "LS2", it is a tvMA(1) process (MA order is 1) with
For dgp = "LS3", it is a tvAR(1) process (MA order is 0) with
a numeric vector of length len_d simulated from the given process.
Tang et al. (2023) Bayesian nonparametric spectral analysis of locally stationary processes ArXiv preprint <arXiv:2303.11561>
## Not run: 
sim_tvarma12(len_d = 1500, 
dgp = "LS2", 
innov_distribution = "a") # generate from LS2a
sim_tvarma12(len_d = 1500, 
dgp = "LS2", 
wn = rnorm(1502)) # again, generate from LS2a
sim_tvarma12(len_d = 1500, 
ar_order = 0, 
ma_order = 1, 
b1 = function(u){1.1*cos(1.5 - cos(4*pi*u))}, 
innov_distribution = "a") # again, generate from LS2a
sim_tvarma12(len_d = 1500, 
ar_order = 0, 
ma_order = 1, 
b1 = function(u){1.1*cos(1.5 - cos(4*pi*u))}, 
wn = rnorm(1502)) # again, generate from LS2a
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.