Closed john-grando closed 2 years ago
Thanks for bringing this to my attention. I've implemented a simpler fix in https://github.com/robjhyndman/forecast/commit/9c79dc3f16242c60944d5c90cbcd15fa631538a1.
Please test it and let me know if it is now working. I've added an example to help(tsCV)
to show how to implement a function with an xreg
argument.
As this package is now in "retired" mode, we are not adding new functionality -- just fixing any bugs that arise and keeping it maintained as required.
Dear @robjhyndman , is/will tsCV
be included in fable
...?
Dear @robjhyndman , is/will
tsCV
be included infable
...?
Refer to this resource for how cross-validation can be done in {fable}
: https://otexts.com/fpp3/tscv.html
Some discussion on potential improved/alternative interfaces for cross-validation is here: https://github.com/tidyverts/fabletools/issues/180
Thank @mitchelloharawild for the extremely prompt reply!
As a sidenote, I think parameter h
is not passed to the function in the far2_xreg
example of the manual.
As a sidenote, I think parameter
h
is not passed to the function in thefar2_xreg
example of the manual.
I'm not sure which example you're referring to, could you provide a link to this?
https://github.com/robjhyndman/forecast/blob/d6ebe534f802d9cbcae9d4eb0717fb83217d537d/R/tscv.R#L52
The function has a parameter h
, but it is never used within the function.
The forecast.Arima()
horizon h
is taken to be the number of rows in newxreg
, which is produced in tsCV
to have h
rows. You could pass in h
also, but it would be overwritten by nrow(newxreg)
.
To add to this, the h
parameter is required as it needed by tsCV
.
I see, thank you very much!
Closing as this is fixed. The {forecast} package is retired, and this is also possible to be done in {fable}.
When using the
xreg
option in the tsCV() function I encountered a few issues and decided to look into them. I prepared a report summarizing the findings and proposed fixes for this function. Thank you so much for providing this great resource. Please let me know if you would like a pull request provided. I wasn't sure how you had this project set up and didn't want to just push something without checking.Report Edited tsCV file