I have daily sales data i am using Tbat function suggested by Rob Hyndman Sir in many Post.my result is not showing growing trend
I am using the following code
mydata<-read.csv ("D:/data.csv",header=TRUE);
y <- msts(mydata$sales, seasonal.periods=c(7,365.25))
fit <- tbats(y)
fc <- forecast(fit)
plot(fc)
As I cannot use your data, here is an example that uses your approach to a) simulate some data with (some kinds of) seasonality, and b) forecasts the next periods.
A) Simulate data
The data is simulated with three components, a sine-function, a cosine-function, and a random component.
B) Forecast the series
Additional Notes
If this approach doesn't work for you that means that your is probably data in some way not right for the forecast...
To check your data, you can inspect the types with
str(mydata)
(in my casestr(df)
),summary(mydata)
, andhead/tail(mydata)
.As a last note, your
dput
is obviously a bit too long... Either postdput(head(mydata, 100))
, which gives the first 100 entries, or upload the csv to a hoster and post the link.Does that point you in the right direction?