我使用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'