I am studying Time Series with R.
Using the stl()
command I get the error
Error in stl(avatar_ts, s.window = "periodic") : series is not periodic or has less than two periods
Below is my code.
avatar_ts = ts(avatar_data$Gross, start = c(2009,12), frequency=365)
st_decompose_method = stl(avatar_ts, s.window="periodic")
If I change the frequency to 12 or 50, the stl()
functions runs.
However my dataset has daily observations from 2009-12-18 till 2010-11-18; a total 318 observation.
(Basically it is daily data but detected a few missing weeks since it is daily movie profit dataset)
How can I use the stl()
function with frequency of 365 for the time series data?