{"id":902,"date":"2015-09-17T12:03:06","date_gmt":"2015-09-17T12:03:06","guid":{"rendered":"http:\/\/kourentzes.com\/forecasting\/?p=902"},"modified":"2015-09-17T12:24:07","modified_gmt":"2015-09-17T12:24:07","slug":"forecasting-multiple-time-series-with-tsintermittent","status":"publish","type":"post","link":"https:\/\/kourentzes.com\/forecasting\/2015\/09\/17\/forecasting-multiple-time-series-with-tsintermittent\/","title":{"rendered":"Forecasting multiple time series with tsintermittent"},"content":{"rendered":"<p>I uploaded a new version (1.7) of tsintermittent on CRAN. Apart from fixing a couple of minor issues, a new function has been added to help scaling up forecasting. Recently I had a few requests to add a functionality to use data frames with multiple time series as inputs. I have included a new wrapper function <code>data.frc<\/code> that does exactly that.<\/p>\n<p>Here is an example. Let us first create some data (10 series of 20 observations each) and call the new function:<br \/>\n<code>&gt; y &lt;- simID(10,20)<br \/>\n&gt; yhat &lt;- data.frc(y,\"crost\")<\/code><br \/>\nThe output has two parts, <code>yhat$frc.out<\/code> will is a data frame with the forecasts for all time series, while <code>yhat$out<\/code> will be a list with the detailed output for each time series.<\/p>\n<p>Currently all forecasting methods in tsintermittent are supported: crost, crost.ma, tsb, sexsm and imapa.<\/p>\n<p>You can also pass other arguments that are relevant to each function that each called, for example:<br \/>\n<code>&gt; yhat &lt;- data.frc(y,\"crost\",h=15,type=\"sba\",na.rm=TRUE)<\/code><br \/>\nThese additional options are documented in each forecasting method.<\/p>\n<p>You may have also noticed that there is a new option for all forecasting methods, <code>na.rm<\/code>, which removes any NA values from each series in the data frame.<\/p>\n<p>Note that if you call <code>crost(y)<\/code>, only the first time series in the data frame will be used, as the individual functions are designed to deal with individual time series. Only the wrapper function will through the complete set.<\/p>\n<p>Hope you find the new function useful! Other minor changes concern the function <code>simID<\/code> which now outputs the generated series as a data frame, resolving an inconsistency in the output of that function with the rest of the package functions.<\/p>\n<div class=\"SPOSTARBUST-Related-Posts\"><H3>Related Posts<\/H3><ul class=\"entry-meta\"><li class=\"SPOSTARBUST-Related-Post\"><a title=\"Intermittent demand &#038; THieF &#8211; EJOR Editors\u2019 Choice Articles\" href=\"https:\/\/kourentzes.com\/forecasting\/2020\/06\/08\/intermittent-demand-thief-ejor-editors-choice-articles\/\" rel=\"bookmark\">Intermittent demand &#038; THieF &#8211; EJOR Editors\u2019 Choice Articles<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"Elucidate structure in intermittent demand time series\" href=\"https:\/\/kourentzes.com\/forecasting\/2020\/05\/25\/elucidate-structure-in-intermittent-demand-time-series\/\" rel=\"bookmark\">Elucidate structure in intermittent demand time series<\/a><\/li>\n<li class=\"SPOSTARBUST-Related-Post\"><a title=\"Tutorial for the nnfor R package\" href=\"https:\/\/kourentzes.com\/forecasting\/2019\/01\/16\/tutorial-for-the-nnfor-r-package\/\" rel=\"bookmark\">Tutorial for the nnfor R package<\/a><\/li>\n<\/ul><\/div><!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>I uploaded a new version (1.7) of tsintermittent on CRAN. Apart from fixing a couple of minor issues, a new function has been added to help scaling up forecasting. Recently I had a few requests to add a functionality to use data frames with multiple time series as inputs. I have included a new wrapper\u2026 <span class=\"read-more\"><a href=\"https:\/\/kourentzes.com\/forecasting\/2015\/09\/17\/forecasting-multiple-time-series-with-tsintermittent\/\">Read More &raquo;<\/a><\/span><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41],"tags":[45,22,39],"_links":{"self":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts\/902"}],"collection":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/comments?post=902"}],"version-history":[{"count":0,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/posts\/902\/revisions"}],"wp:attachment":[{"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/media?parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/categories?post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kourentzes.com\/forecasting\/wp-json\/wp\/v2\/tags?post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->