Comments (8)
You have the frequency set to 1 so forecast
doesn't know anything about the seasonality. It looks like your seasonality is around 100 periods, in which case frequency should be 100.
from hts.
Thanks for the quick response! I was trying to set the frequency but I didn't see how. I set it in the ts object before converting to the hts object, but then it reset to 1 and 'frequency' wasn't an argument when setting the hts object. How can I do this? Or do I need to deal with seasonality before hts forecast?
Thanks again!
S
from hts.
If you set it in the ts object it should be retained. See https://otexts.com/fpp2/hts.html for an example where this is done with seasonal data.
from hts.
It turns out when I subsetted my ts object into train and test objects it removed the frequency! I'll give it another go. I usually code in python so I'm liable to make stupid mistakes in R. Thanks again!
from hts.
Use the window()
function for subsetting ts and hts objects
from hts.
Hello again! I'm trying now to combine the fourier function from 9.5 of your textbook to deal with seasonality. It works on a normal ts object, but when I set xreg=fourier(my.hst,K=11) I get this error:
Error in ...fourier(x, K, 1:NROW(x)) :
K must be not be greater than period/2
NROW(hts) seems to be 3, and I couldn't find a way to index hts that would allow it to work. Is there a way to do this?
Thanks again!
S
from hts.
In an unrelated question (I wasn't sure if I should start a new thread), I was curious to know how an hts forecast would handle partially complete time series. For instance, if one base time series has a length of 100, but base time series #2 is only at 90 and I would like to forecast the remaining 10. Of course I could limit all the time series to 90, but I would prefer to use the information from the series for which I have complete data. How would hst handle the missing values in some of the series, and is there a way to forecast those values aside from removing all rows with NAs?
Thank you, I really appreciate the help!
Best
S
from hts.
I suggest you ask these questions on http://community.rstudio.com. This is not intended to be a help site.
from hts.
Related Issues (20)
- MinT: Error in if (!is.symmetric.matrix(x)) stop("argument x is not a symmetric matrix") : missing value where TRUE/FALSE needed HOT 1
- MinT needs covariance matrix to be positive definite. HOT 9
- parallel doesnt work on custom functions HOT 2
- Implement Hyndman's fix for non conforming forecast
- Issue with gts
- Error in install.packages : cannot open the connection HOT 1
- Interop with tidyverts HOT 6
- Warning message if constant columns are passed to MinT
- Getting fitted and residual values when using comb nonnegative method
- How to work on a single level hierarchy?
- hts cannot create a hierarchical time series for a single observation HOT 1
- A typo in the code causes error when calling forecast.gts() with nonnegative=T parameter HOT 1
- Missing nodes (time-series) in hierarchy: combinef reconciliation function error HOT 2
- combinef function to constrain bottom level predictions with external predictions in gts
- Sample covariance calculation HOT 2
- Failed to install 'hts' due to RcppEigen.h
- forecast.gts argument conflicts with auto.arima via ... HOT 1
- Add support for RMSSE metric
- Error with hts forecasting with 2 levels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hts.