Description Usage Arguments Details Value Author(s) References Examples
The funstion carfima.sim
produces discrete time series data that follow a CARFIMA(p, H, q) model given the values for the model parameters and observation times.
1 | carfima.sim(parameter, time, measure.error, ar.p, ma.q)
|
parameter |
A vector of length p+q+2 for the generative values of the model parameters; p values of α_j's, q values of β_j's, H, and σ. |
time |
A vector for the k observation times, either regularly or irregularly spaced. |
measure.error |
(Optional) A vector for the k measurement error standard deviations, if such information is available (especially for astronomical applications). A vector of zeros is automatically assigned, if nothing is specified. |
ar.p |
A scalar for the order of the AR model. |
ma.q |
A scalar for the order of the MA model. |
This function produces simulated discrete time series data following a CARFIMA(p, H, q) model given the values for the model parameters and observation times. It first derives a k-dimensional multivariate Gaussian distribution whose mean set to a vector of zeros, where k is the number of observations. The covariance matrix is filled with Cov(Y_{t_i}, Y_{t_j}) and its closed-form formula is specified in Theorem 1(b) and 1(c) of Tsai and Chan (2005).
The outcome of carfima.sim
is a vector for k simulated data following a CARFIMA(p, H, q) model given the values for the model parameters and observation times.
Hyungsuk Tak, Henghsiu Tsai, Kisung You
H. Tsai and K.S. Chan (2005) "Maximum Likelihood Estimation of Linear Continuous Time Long Memory Processes with Discrete Time Data," Journal of the Royal Statistical Society (Series B), 67 (5), 703-716. DOI: 10.1111/j.1467-9868.2005.00522.x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ##### Irregularly spaced observation time generation.
length.time <- 30
time.temp <- rexp(length.time, rate = 2)
time <- rep(NA, length.time + 1)
time[1] <- 0
for (i in 2 : (length.time + 1)) {
time[i] <- time[i - 1] + time.temp[i - 1]
}
time <- time[-1]
##### Data genration for CARFIMA(1, H, 0) based on the observation times.
parameter <- c(-0.4, 0.8, 0.2)
# AR parameter alpha = -0.4
# Hurst parameter = 0.8
# Process uncertainty (standard deviation) sigma = 0.2
me.sd <- rep(0.05, length.time)
# Known measurement error standard deviations 0.05 for all observations
# If not known, remove the argument "measure.error = me.sd" in the following codes,
# so that the default values (zero) are automatically assigned.
y <- carfima.sim(parameter = parameter, time = time,
measure.error = me.sd, ar.p = 1, ma.q = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.