yghb9
用 R 计算 hurst 指数的问题
用R 2.5.0 软件。
下一个 RandomFields_1.3.4.zip,按要求解压后加入 library,并加载 library(RandomFields)。
1。 建一个数据文件,如 data.txt,里面只有一列数字。
2。 用命令方式读入: d=read.table("data.txt",header=F)
3。 转成时间序列: t=as.ts(d$V1)
4。 计算 hurst 指数:hurst(t)
运行 hurst(t) 时报错--- “错误于FUN(X[[1L]], ...) : different grid distances detected, but the grid must have equal distances in each direction -- try gridtriple=TRUE that avoids numerical errors.”
请问上述步骤和命令有什么问题,为什么出错?