0

我正在使用 Biwavelet 在 R 中进行小波分析。但是,我收到错误消息:

check.datum(y) 中的错误:步长必须是恒定的(请参阅要插值的近似函数)

当我运行以下代码时:

wtc.AB = wtc(t1, t2, nrands = nrands)

请在这里分享您的帮助。完整代码为:

# Import your data
Data <- read.csv("https://dl.dropboxusercontent.com/u/18255955/Tutorials/Commodities.csv")
# Attach your data so that you can access variables directly using their
# names
attach(Data)
# Define two sets of variables with time stamps
t1 = cbind(DATE, ISLX)
t2 = cbind(DATE, GOLD)
# Specify the number of iterations. The more, the better (>1000).  For the
# purpose of this tutorial, we just set it = 10
nrands = 10
wtc.AB = wtc(t1, t2, nrands = nrands)
# Plotting a graph
par(oma = c(0, 0, 0, 1), mar = c(5, 4, 5, 5) + 0.1)
plot(wtc.AB, plot.phase = TRUE, lty.coi = 1, col.coi = "grey", lwd.coi = 2, 
    lwd.sig = 2, arrow.lwd = 0.03, arrow.len = 0.12, ylab = "Scale", xlab = "Period", 
    plot.cb = TRUE, main = "Wavelet Coherence: A vs B")```
4

0 回答 0