-2
Box-Ljung試験データ:X-二乗= NA、df = 20、p値= NA。 PvaluesとXsquaredはN/Aとして来ている、しかし、私のデータ値は、任意のゼロPvalueおよびXquaredはBox-Ljung試験でN/Aである。
Box-Ljung試験データ:X-二乗= NA、df = 20、p値= NA。 PvaluesとXsquaredはN/Aとして来ている、しかし、私のデータ値は、任意のゼロPvalueおよびXquaredはBox-Ljung試験でN/Aである。
を持っていない私たちは例を取る場合:
V <- data.frame(c(12,45,48,31,12,7,78),
rnorm(7, mean = 45, sd = 2),
c(1,0,0,1,0,0,1),
c(0,1,0,0,0,1,0),
c(0,0,1,0,0,0,0),
c(0,0,0,0,1,0,0))
colnames(V) <- c("Col1","Col2","Alpha","Beta","Gamma","Delta")
Box.test(V$Col1, lag = 20, type = "Ljung-Box", fitdf = 0)
我々が得る:
Box-Ljung test
data: V$Col1
X-squared = NA, df = 20, p-value = NA
を今、私たちは、意志遅れを変える。
Box.test(V$Col1, lag = 1, type = "Ljung-Box", fitdf = 0)
Box-Ljung test
data: V$Col1
X-squared = 0.30832, df = 1, p-value = 0.5787
あなたのラグ(20)はあなたの時系列の長さよりも長いと思います。
はのは、別の例を見てみましょう:
X <- data.frame(rnorm(28000, sd = 0.3),
rnorm(28000, mean = 1, sd = 0.3),
sample(LETTERS[1:24], 28000, replace=TRUE),
sample(letters[1:10], 28000, replace=TRUE),
round(rnorm(28000,mean=25, sd=3)),
round(runif(n = 28000,min = 1000,max = 25000)),
round(runif(28000,0,200000)))
colnames(X) <- c("A","B","C","D","E","F","G")
_______________________
Box.test(X$A, lag = 1000, type = "Ljung-Box", fitdf = 0)
Box-Ljung test
data: X$A
X-squared = 1108.8, df = 1000, p-value = 0.009034
_______________________
Box.test(X$A, lag = 100000, type = "Ljung-Box", fitdf = 0)
Box-Ljung test
data: X$A
X-squared = NA, df = 1e+05, p-value = NA
はあなたにJ.Gourlayをありがとうございます。私はこれを試し、あなたに知らせるでしょう。私の質問で十分な情報が不足しているため、便利にごめんね。 –