0

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.

Gholamali Irani
  • 4,391
  • 6
  • 28
  • 59
BigMadAndy
  • 153
  • 1
  • 9
  • Can you copy/paste the data using `dput`? – tyluRp Jan 13 '18 at 08:02
  • I've never used dput, so I'm sure what its purpose but if I dput mydata I receive: structure(list(sales_month_value = c(4752.19, [shortened - the list of values is here])), .Names = "sales_month_value", class = "data.frame", row.names = c(NA, -84L)) – BigMadAndy Jan 13 '18 at 08:12
  • See [**here**](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to make minimal, reproducible examples. `dput` allows you to share your data with others by copy/pasting it. – tyluRp Jan 13 '18 at 08:14

0 Answers0