Am I having problems with the stl () time series decomposition function in R telling me that my ts object is not one-dimensional, when is it really?
tsData <- ts(data = dummyData, start = c(2012,1), end = c(2014,12), frequency = 12) > tsData Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2012 22 26 34 33 40 39 39 45 50 58 64 78 2013 51 60 80 80 93 100 96 108 111 119 140 164 2014 103 112 154 135 156 170 146 156 166 176 193 204 > class(tsData) [1] "ts" > stl(tsData, s.window = "periodic") Error in stl(tsData, s.window = "periodic") : only univariate series are allowed > dput(dummyData) structure(list(index = c(22L, 26L, 34L, 33L, 40L, 39L, 39L, 45L, 50L, 58L, 64L, 78L, 51L, 60L, 80L, 80L, 93L, 100L, 96L, 108L, 111L, 119L, 140L, 164L, 103L, 112L, 154L, 135L, 156L, 170L, 146L, 156L, 166L, 176L, 193L, 204L)), .Names = "index", class = "data.frame", row.names = c(NA, -36L))
Does anyone know how to fix this problem?