I'm a beginner learning time series analysis.
I want to clean up the data I will be using for ARIMA. However, tsclean
gives me an error message:
("Error in stl(xx, s.window = "periodic", robust = TRUE) : only univariate series are allowed")
And I don't understand why.
My code looks like that:
read.csv("FILENAME.csv",header=TRUE)
mydata<-read.csv("FILENAME.csv")
mydata2<-ts(mydata,freq=12,start=c(2011,1))
class(mydata2) # the result here is "ts"
mydataclean<-tsclean(mydata2) # the result is "Error in stl(xx, s.window = "periodic", robust = TRUE) : only univariate series are allowed"
The file FILENAME.csv
is composed of just one column with data. The data is for full 7 years monthly.