BoxCox转换出错 - $运算符对原子向量无效

时间:2018-01-23 02:30:12

标签: r lambda time-series transformation

我使用R来使用BoxCox函数转换数据。但我得到了这个错误:

lambda<-BoxCox.lambda(tsclose3)
lambda
[1] 1.999924
boxcox(tsclose3,lambda = lambda)

**Error in object$y : $ operator is invalid for atomic vectors**
你可以帮我解决这个问题吗?

* tsclose3是时间序列数据,我已将其更改为as.data.frame和as.list但错误仍然存​​在

boxcox(tsclose3,lambda = lambda)
Error in object$y : $ operator is invalid for atomic vectors
bcclose<-as.list(tsclose3)
lambda<-BoxCox.lambda(bcclose)
Error in BoxCox.lambda(bcclose) : 
  (list) object cannot be coerced to type 'double'

0 个答案:

没有答案