## Sample bivariate locally stationary time series
set.seed(1)
X <- matrix(rnorm(2 * 2^8), ncol = 2)
X[1:2^7, 2] <- 3 * (X[1:2^7, 2] + 0.95 * X[1:2^7, 1])
X[-(1:2^7), 2] <- X[-(1:2^7), 2] - 0.95 * X[-(1:2^7), 1]
X[-(1:2^7), 1] <- X[-(1:2^7), 1] * 4
X <- as.ts(X)
# create some missing values, taking care to provide some data at the start of the series
missing.index = sort(sample(10:2^8, 30))
X[missing.index, ] <-NA
# estimate the spectrum
spec = spec_estimation(X)
Run the code above in your browser using DataLab