I have a string a time-series data which I am trying to decompose. Each data-point corresponds to the start date of a given month and looks something like:
A <- c(5,6,7,8,9,8,5,6,10,11)
I convert the data to a time-series using the following:
A1 <- as.ts(A, frequency=12)
Then I try to decompose using:
decompose(A1)
I get the following error:
time series has no or less than 2 periods`
I have also used the zoo
package to create a similar time-series, but get the same result.
Any thoughts?