Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
library(astsa, quietly=TRUE, warn.conflicts=FALSE)
cc <- ts(Mobile_Payments,frequency = 12,start = c(2010,1))
plot.ts(cc[,5], main="Trend and Seasonal Monthly Data", ylab="Total Agent Cash in Cash Out (Volume Million")
x <- xts(Mobile_Payments$`Total Agent Cash in Cash Out (Volume Million)`,as.Date(Mobile_Payments$Dates),frequency = 12, start =c(2010,1),end =c(2021,2))
decomposex <- decompose(x,"multiplicative")
Error in decompose(x, "multiplicative") :
time series has no or less than 2 periods