diff --git a/dev/LICENSE.html b/dev/LICENSE.html index f8025fab..7595b67d 100644 --- a/dev/LICENSE.html +++ b/dev/LICENSE.html @@ -17,7 +17,7 @@
@@ -63,6 +63,7 @@Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
@@ -92,7 +93,7 @@The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
@@ -101,23 +102,23 @@All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.
You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
@@ -171,24 +172,24 @@You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.
A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
@@ -199,30 +200,30 @@If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
-<one line to give the program's name and a brief idea of what it does.>
-Copyright (C) 2019 Rob J Hyndman
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
<one line to give the program's name and a brief idea of what it does.>
+Copyright (C) 2019 Rob J Hyndman
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
-fable Copyright (C) 2019 Rob J Hyndman
-This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type 'show c' for details.
Copyright (C) 2019 Rob J Hyndman
+ fable for details type 'show w'.
+ This program comes with ABSOLUTELY NO WARRANTY;
+ This is free software, and you are welcome to redistribute it'show c' for details. under certain conditions; type
The hypothetical commands show w
and show c
should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -273,7 +274,7 @@library(fable)
library(tsibble)
library(dplyr)
The fable package provides some commonly used univariate and multivariate time series forecasting models which can be used with tidy temporal data in the tsibble format. These models are used within a consistent and tidy modelling framework, allowing several models to be estimated, compared, combined, forecasted and otherwise worked with across many time series.
-Suppose we wanted to forecast the number of domestic travellers to Melbourne, Australia. In the tsibble::tourism
data set, this can be further broken down into 4 reasons of travel: “business”, “holiday”, “visiting friends and relatives” and “other reasons”. The first observation from each series are shown below.
The fable package provides some commonly used univariate and +multivariate time series forecasting models which can be used with tidy +temporal data in the tsibble format. These models are used within a +consistent and tidy modelling framework, allowing several models to be +estimated, compared, combined, forecasted and otherwise worked with +across many time series.
+Suppose we wanted to forecast the number of domestic travellers to
+Melbourne, Australia. In the tsibble::tourism
data set,
+this can be further broken down into 4 reasons of travel: “business”,
+“holiday”, “visiting friends and relatives” and “other reasons”. The
+first observation from each series are shown below.
tourism_melb <- tourism %>%
filter(Region == "Melbourne")
@@ -123,13 +132,30 @@ Introduction to fable
#> 2 1998 Q1 Melbourne Victoria Holiday 428.
#> 3 1998 Q1 Melbourne Victoria Other 79.9
#> 4 1998 Q1 Melbourne Victoria Visiting 666.
The variable that we’d like to estimate is the number of overnight trips (in thousands) represented by the Trips
variable. A plot of the data reveals that some trends and weak seasonality are apparent.
The variable that we’d like to estimate is the number of overnight
+trips (in thousands) represented by the Trips
variable. A
+plot of the data reveals that some trends and weak seasonality are
+apparent.
Two widely used models available in this package are ETS and ARIMA. These models are specified using a compact formula representation (much like cross-sectional linear models using lm()
). The response variable (Trips
) and any transformations are included on the left, while the model specification is on the right of the formula. When a model is not fully specified (or if the formula’s right side is missing completely), the unspecified components will be chosen automatically.
Suppose we think that the ETS model must have an additive trend, and want the other elements to be chosen automatically. This model would be specified using ETS(Trips ~ trend("A"))
. Similarly, a completely automatic ARIMA model (much like auto.arima()
from the forecast
package) can be specified using ARIMA(Trips)
. The model()
function is used to estimate these model specifications on a particular dataset, and will return a “mable” (model table).
Two widely used models available in this package are ETS and ARIMA.
+These models are specified using a compact formula representation (much
+like cross-sectional linear models using lm()
). The
+response variable (Trips
) and any transformations are
+included on the left, while the model specification is on the right of
+the formula. When a model is not fully specified (or if the formula’s
+right side is missing completely), the unspecified components will be
+chosen automatically.
Suppose we think that the ETS model must have an additive trend, and
+want the other elements to be chosen automatically. This model would be
+specified using ETS(Trips ~ trend("A"))
. Similarly, a
+completely automatic ARIMA model (much like auto.arima()
+from the forecast
package) can be specified using
+ARIMA(Trips)
. The model()
function is used to
+estimate these model specifications on a particular dataset, and will
+return a “mable” (model table).
fit <- tourism_melb %>%
model(
@@ -145,30 +171,43 @@ Introduction to fable
#> 2 Melbourne Victoria Holiday <ETS(M,A,A)> <ARIMA(0,1,1) w/ drift>
#> 3 Melbourne Victoria Other <ETS(A,A,N)> <ARIMA(0,1,1) w/ drift>
#> 4 Melbourne Victoria Visiting <ETS(M,A,A)> <ARIMA(0,1,1)(1,0,2)[4]>
A mable contains a row for each time series (uniquely identified by the key variables), and a column for each model specification. A model is contained within the cells of each model column. In the example above we can see that the all four ETS models have an additive trend, and the error and seasonality have been chosen automatically. Similarly, the ARIMA model varies between time series as it has been automatically selected.
-The coef()
or tidy()
function is used to extract the coefficients from the models. It’s possible to use select()
and other verbs to focus on the coefficients from a particular model.
A mable contains a row for each time series (uniquely identified by +the key variables), and a column for each model specification. A model +is contained within the cells of each model column. In the example above +we can see that the all four ETS models have an additive trend, and the +error and seasonality have been chosen automatically. Similarly, the +ARIMA model varies between time series as it has been automatically +selected.
+The coef()
or tidy()
function is used to
+extract the coefficients from the models. It’s possible to use
+select()
and other verbs to focus on the coefficients from
+a particular model.
fit %>%
select(Region, State, Purpose, arima) %>%
coef()
#> # A tibble: 13 × 9
-#> Region State Purpose .model term estimate std.e…¹ stati…² p.value
-#> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
-#> 1 Melbourne Victoria Business arima ma1 -0.555 0.130 -4.28 5.29e- 5
-#> 2 Melbourne Victoria Business arima ma2 -0.233 0.129 -1.81 7.47e- 2
-#> 3 Melbourne Victoria Business arima sar1 0.946 0.0634 14.9 1.08e-24
-#> 4 Melbourne Victoria Business arima sma1 -0.772 0.145 -5.34 8.81e- 7
-#> 5 Melbourne Victoria Business arima constant 0.192 0.213 0.903 3.69e- 1
-#> 6 Melbourne Victoria Holiday arima ma1 -0.931 0.0851 -10.9 1.77e-17
-#> 7 Melbourne Victoria Holiday arima constant 3.65 0.571 6.39 1.06e- 8
-#> 8 Melbourne Victoria Other arima ma1 -0.750 0.0708 -10.6 8.19e-17
-#> 9 Melbourne Victoria Other arima constant 1.24 0.640 1.93 5.70e- 2
-#> 10 Melbourne Victoria Visiting arima ma1 -0.838 0.0652 -12.8 5.03e-21
-#> 11 Melbourne Victoria Visiting arima sar1 0.659 0.193 3.41 1.03e- 3
-#> 12 Melbourne Victoria Visiting arima sma1 -0.402 0.206 -1.95 5.47e- 2
-#> 13 Melbourne Victoria Visiting arima sma2 0.322 0.143 2.26 2.68e- 2
-#> # … with abbreviated variable names ¹std.error, ²statistic
The glance()
function provides a one-row summary of each model, and commonly includes descriptions of the model’s fit such as the residual variance and information criteria. Be wary though, as information criteria (AIC, AICc, BIC) are only comparable between the same model class and only if those models share the same response (after transformations and differencing).
The glance()
function provides a one-row summary of each
+model, and commonly includes descriptions of the model’s fit such as the
+residual variance and information criteria. Be wary though, as
+information criteria (AIC, AICc, BIC) are only comparable between the
+same model class and only if those models share the same response (after
+transformations and differencing).
fit %>%
glance()
@@ -183,8 +222,10 @@ Introduction to fable
#> 6 Melbourne Victor… Other arima 4.89e+2 -356. 718. 719. 725. NA NA
#> 7 Melbourne Victor… Visiti… ets 1.09e-2 -503. 1024. 1026. 1045. 3714. 3860.
#> 8 Melbourne Victor… Visiti… arima 4.24e+3 -442. 893. 894. 905. NA NA
-#> # … with 3 more variables: MAE <dbl>, ar_roots <list>, ma_roots <list>
If you’re working with a single model (or want to look at one model in particular), the report()
function gives a familiar and nicely formatted model-specific display.
If you’re working with a single model (or want to look at one model
+in particular), the report()
function gives a familiar and
+nicely formatted model-specific display.
fit %>%
filter(Purpose == "Holiday") %>%
@@ -205,7 +246,11 @@ Introduction to fable
#>
#> AIC AICc BIC
#> 991.7305 994.3020 1013.1688
The fitted values and residuals from a model can obtained using fitted()
and residuals()
respectively. Additionally, the augment()
function may be more convenient, which provides the original data along with both fitted values and their residuals.
The fitted values and residuals from a model can obtained using
+fitted()
and residuals()
respectively.
+Additionally, the augment()
function may be more
+convenient, which provides the original data along with both fitted
+values and their residuals.
fit %>%
augment()
@@ -223,11 +268,17 @@ Introduction to fable
#> 8 Melbourne Victoria Business ets 1999 Q4 426. 424. 1.49 1.49
#> 9 Melbourne Victoria Business ets 2000 Q1 495. 364. 130. 130.
#> 10 Melbourne Victoria Business ets 2000 Q2 499. 477. 22.0 22.0
-#> # … with 630 more rows
To compare how well the models fit the data, we can consider some common accuracy measures. It seems that on the training set the ETS model out-performs ARIMA for the series where travellers are on holiday, business, and visiting friends and relatives. The Evaluating modelling accuracy chapter from the Forecasting: Principles and Practices (3rd Ed.) textbook provides more detail in how modelling and forecasting accuracy is evaluated.
+#> # ℹ 630 more rowsTo compare how well the models fit the data, we can consider some +common accuracy measures. It seems that on the training set the ETS +model out-performs ARIMA for the series where travellers are on holiday, +business, and visiting friends and relatives. The Evaluating modelling +accuracy chapter from the Forecasting: Principles and +Practices (3rd Ed.) textbook provides more detail in how +modelling and forecasting accuracy is evaluated.
fit %>%
- accuracy() %>%
+ accuracy() %>%
arrange(MASE)
#> # A tibble: 8 × 13
#> Region State Purpose .model .type ME RMSE MAE MPE MAPE MASE RMSSE
@@ -240,11 +291,12 @@ Introduction to fable
#> 6 Melbou… Vict… Other ets Trai… -0.142 21.7 17.0 -5.97 19.6 0.767 0.773
#> 7 Melbou… Vict… Visiti… ets Trai… 8.17 60.9 51.4 0.433 8.28 0.819 0.782
#> 8 Melbou… Vict… Visiti… arima Trai… 6.89 63.1 51.7 0.106 8.44 0.825 0.809
-#> # … with 1 more variable: ACF1 <dbl>
Forecasts from these models can be produced directly as our specified models do not require any additional data.
+#> # ℹ 1 more variable: ACF1 <dbl> +Forecasts from these models can be produced directly as our specified +models do not require any additional data.
fc <- fit %>%
- forecast(h = "5 years")
+ forecast(h = "5 years")
fc
#> # A fable: 160 x 7 [1Q]
#> # Key: Region, State, Purpose, .model [8]
@@ -260,13 +312,17 @@ Introduction to fable
#> 8 Melbourne Victoria Business ets 2019 Q4 N(759, 6181) 759.
#> 9 Melbourne Victoria Business ets 2020 Q1 N(710, 6786) 710.
#> 10 Melbourne Victoria Business ets 2020 Q2 N(800, 7458) 800.
-#> # … with 150 more rows
The resulting forecasts are contained in a “fable” (forecast table), and both point forecasts and forecast distributions are available in the table for the next five years. Confidence intervals can be extracted from the distribution using the hilo()
function.
The resulting forecasts are contained in a “fable” (forecast table),
+and both point forecasts and forecast distributions are available in the
+table for the next five years. Confidence intervals can be extracted
+from the distribution using the hilo()
function.
The hilo()
function can also be used on fable objects, which allows you to extract multiple intervals at once.
The hilo()
function can also be used on fable objects,
+which allows you to extract multiple intervals at once.
fc %>%
hilo(level = c(80, 95))
@@ -284,7 +340,8 @@ Introduction to fable
#> 8 Melbo… Vict… Busine… ets 2019 Q4 N(759, 6181) 759. [658.1603, 859.6735]80
#> 9 Melbo… Vict… Busine… ets 2020 Q1 N(710, 6786) 710. [603.9336, 815.0789]80
#> 10 Melbo… Vict… Busine… ets 2020 Q2 N(800, 7458) 800. [689.3620, 910.7146]80
-#> # … with 150 more rows, and 1 more variable: `95%` <hilo>
You can also see a plot of the forecasts using autoplot()
. To see the historical data along with the forecasts you can provide it as the first argument to the function.
You can also see a plot of the forecasts using
+autoplot()
. To see the historical data along with the
+forecasts you can provide it as the first argument to the function.
More model methods may be supported by particular models, including the ability to refit()
the model to new data, stream()
in new data to extend the fit, generate()
simulated paths from a model, interpolate()
missing values, extract components()
from the fitted model, and display the model’s equation()
.
More information about modelling time series and using the fable package can be found in Forecasting: Principles and Practices (3rd Ed.) and in the pkgdown site.
+More model methods may be supported by particular models, including
+the ability to refit()
the model to new data,
+stream()
in new data to extend the fit,
+generate()
simulated paths from a model,
+interpolate()
missing values, extract
+components()
from the fitted model, and display the model’s
+equation()
.
More information about modelling time series and using the fable +package can be found in Forecasting: Principles and +Practices (3rd Ed.) and in the pkgdown site.
@@ -80,7 +80,7 @@vignettes/transformations.Rmd
@@ -103,8 +104,16 @@ All fable models with formula-based model specification support a highly flexible specification of transformations. Specified transformations are automatically back-transformed and bias adjusted to produce forecast means and fitted values on the original scale of the data.
-The transformation used for the model is defined on the left of the tilde (~
) in the formula. For example, when forecasting Melbourne Trips
from the tsibble::tourism
dataset, a square root transformation can applied using sqrt(Trips)
.
All fable models with formula-based model specification support a +highly flexible specification of transformations. Specified +transformations are automatically back-transformed and bias adjusted to +produce forecast means and fitted values on the original scale of the +data.
+The transformation used for the model is defined on the left of the
+tilde (~
) in the formula. For example, when forecasting
+Melbourne Trips
from the tsibble::tourism
+dataset, a square root transformation can applied using
+sqrt(Trips)
.
library(fable)
#> Loading required package: fabletools
@@ -137,8 +146,16 @@ Mitchell O’Hara-Wild
Combining transformations
-Multiple transformations can be combined using this interface, allowing more complicated transformations to be used. A simple example of a combined transformation is \(f(x) = log(x+1)\), as it involves both a log
transformation, and a +1
transformation. This transformation is commonly used to overcome a limitation of using log transformations to preserve non-negativity, on data which contains zeroes.
-Simple combined transformations and backtransformations can be constructed automatically.
+Multiple transformations can be combined using this interface,
+allowing more complicated transformations to be used. A simple example
+of a combined transformation is \(f(x) =
+log(x+1)\), as it involves both a log
+transformation, and a +1
transformation. This
+transformation is commonly used to overcome a limitation of using log
+transformations to preserve non-negativity, on data which contains
+zeroes.
+Simple combined transformations and backtransformations can be
+constructed automatically.
library(tsibble)
tourism %>%
@@ -156,11 +173,26 @@ Combining transformations
Custom transformations
-It is possible to extend the supported transformations by defining your own transformation with an appropriate back-transformation function. It is assumed that the first argument of your function is your data which is being transformed.
-A useful transformation which is not readily supported by fable is the scaled logit, which allows the forecasts to be bounded by a given interval (forecasting within limits). The appropriate transformation to ensure the forecasted values are between \(a\) and \(b\) (where \(a<b\)) is given by:
-\[f(x) = \log\left(\dfrac{x-a}{b-x}\right)\]
-Inverting this transformation gives the appropriate back-transformation of:
-\[f^{-1}(x) = \dfrac{a + be^x}{1 + e^x} = \dfrac{(b-a)e^x}{1 + e^x} + a\] To use this transformation for modelling, we can pair the transformation with its back transformation using the new_transformation
function from fabletools
. This function which accepts two inputs: first the transformation, and second the back-transformation.
+It is possible to extend the supported transformations by defining
+your own transformation with an appropriate back-transformation
+function. It is assumed that the first argument of your function is your
+data which is being transformed.
+A useful transformation which is not readily supported by fable is
+the scaled logit, which allows the forecasts to be bounded by a given
+interval (forecasting
+within limits). The appropriate transformation to ensure the
+forecasted values are between \(a\) and
+\(b\) (where \(a<b\)) is given by:
+\[f(x) =
+\log\left(\dfrac{x-a}{b-x}\right)\]
+Inverting this transformation gives the appropriate
+back-transformation of:
+\[f^{-1}(x) = \dfrac{a + be^x}{1 + e^x} =
+\dfrac{(b-a)e^x}{1 + e^x} + a\] To use this transformation for
+modelling, we can pair the transformation with its back transformation
+using the new_transformation
function from
+fabletools
. This function which accepts two inputs: first
+the transformation, and second the back-transformation.
scaled_logit <- function(x, lower=0, upper=1){
log((x-lower)/(upper-x))
@@ -169,7 +201,8 @@ Custom transformations (upper-lower)*exp(x)/(1+exp(x)) + lower
}
my_scaled_logit <- new_transformation(scaled_logit, inv_scaled_logit)
-Once you define your transformation as above, it is ready to use anywhere you would normally use a transformation.
+Once you define your transformation as above, it is ready to use
+anywhere you would normally use a transformation.
cbind(mdeaths, fdeaths) %>%
as_tsibble(pivot_longer = FALSE) %>%
@@ -197,10 +230,26 @@ Custom transformations
Forecast means and medians
-When forecasting with transformations, the model is fitted and forecasted using the transformed data. To produce forecasts of the original data, the predicted values must be back-transformed. However this process of predicting transformed data and backtransforming predictions usually results in producing forecast medians. To convert the forecast medians into forecast means, a transformation bias adjustment is required:
-\[\hat{y} = f^{-1}(\tilde{y}) + \dfrac{1}{2}\sigma^2\dfrac{\partial^2}{\partial \tilde{y}^2}f^{-1}(\tilde{y})\] Note that the forecast medians are given by \(f^{-1}(\tilde{y})\), and the adjustment needed to produce forecast means (\(\hat{y}\)) is \(\dfrac{1}{2}\sigma^2\dfrac{\partial^2}{\partial \tilde{y}^2}f^{-1}(\tilde{y})\).
-The fable package automatically produces forecast means (by back-transforming and adjusting the transformed forecasts). The forecast medians can be obtained via the forecast intervals when level=0
.
-More information about adjusting forecasts to compute forecast means can be found at the forecast mean after back-transformation.
+When forecasting with transformations, the model is fitted and
+forecasted using the transformed data. To produce forecasts of the
+original data, the predicted values must be back-transformed. However
+this process of predicting transformed data and backtransforming
+predictions usually results in producing forecast medians. To convert
+the forecast medians into forecast means, a transformation bias
+adjustment is required:
+\[\hat{y} = f^{-1}(\tilde{y}) +
+\dfrac{1}{2}\sigma^2\dfrac{\partial^2}{\partial
+\tilde{y}^2}f^{-1}(\tilde{y})\] Note that the forecast medians
+are given by \(f^{-1}(\tilde{y})\), and
+the adjustment needed to produce forecast means (\(\hat{y}\)) is \(\dfrac{1}{2}\sigma^2\dfrac{\partial^2}{\partial
+\tilde{y}^2}f^{-1}(\tilde{y})\).
+The fable package automatically produces forecast means (by
+back-transforming and adjusting the transformed forecasts). The forecast
+medians can be obtained via the forecast intervals when
+level=0
.
+More information about adjusting forecasts to compute forecast means
+can be found at the
+forecast mean after back-transformation.
@@ -221,7 +270,7 @@ Forecast means and medians
-Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/dev/articles/transformations_files/accessible-code-block-0.0.1/empty-anchor.js b/dev/articles/transformations_files/accessible-code-block-0.0.1/empty-anchor.js
deleted file mode 100644
index ca349fd6..00000000
--- a/dev/articles/transformations_files/accessible-code-block-0.0.1/empty-anchor.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
-// v0.0.1
-// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.
-
-document.addEventListener('DOMContentLoaded', function() {
- const codeList = document.getElementsByClassName("sourceCode");
- for (var i = 0; i < codeList.length; i++) {
- var linkList = codeList[i].getElementsByTagName('a');
- for (var j = 0; j < linkList.length; j++) {
- if (linkList[j].innerHTML === "") {
- linkList[j].setAttribute('aria-hidden', 'true');
- }
- }
- }
-});
diff --git a/dev/authors.html b/dev/authors.html
index be94b2c5..6ea80fbe 100644
--- a/dev/authors.html
+++ b/dev/authors.html
@@ -17,7 +17,7 @@
O'Hara-Wild M, Hyndman R, Wang E (2022). +
O'Hara-Wild M, Hyndman R, Wang E (2024). fable: Forecasting Models for Tidy Time Series. -https://fable.tidyverts.org, https://github.com/tidyverts/fable. +R package version 0.3.3.9000, https://github.com/tidyverts/fable, https://fable.tidyverts.org.
@Manual{, title = {fable: Forecasting Models for Tidy Time Series}, author = {Mitchell O'Hara-Wild and Rob Hyndman and Earo Wang}, - year = {2022}, - note = {https://fable.tidyverts.org, https://github.com/tidyverts/fable}, + year = {2024}, + note = {R package version 0.3.3.9000, https://github.com/tidyverts/fable}, + url = {https://fable.tidyverts.org}, }
The R package fable provides a collection of commonly used univariate and multivariate time series forecasting models including exponential smoothing via state space models and automatic ARIMA modelling. These models work within the fable framework, which provides the tools to evaluate, visualise, and combine models in a workflow consistent with the tidyverse.
NEWS.md
-
+
+
refit()
method for NNETAR, MEAN, RW, SNAIVE, and NAIVE models (#287, #289, #321. @Tim-TU).hfitted()
method for ETS and ARIMA, this allows fast estimation of h-step ahead fitted values.generate()
method for AR, the forecast()
method now supports bootstrap forecasting via this new method.generate()
method for AR, the forecast()
method now supports bootstrap forecasting via this new method.This release coincides with v0.2.0 of the fabletools package, which contains some substantial changes to the output of forecast()
methods. These changes to fabletools emphasise the distribution in the fable object. The most noticeable is a change in column names of the fable, with the distribution now stored in the column matching the response variable, and the forecast mean now stored in the .mean
column. For a complete summary of these changes, refer to the fabletools v0.2.0 release news: https://fabletools.tidyverts.org/news/index.html
This release coincides with v0.2.0 of the fabletools package, which contains some substantial changes to the output of forecast()
methods. These changes to fabletools emphasise the distribution in the fable object. The most noticeable is a change in column names of the fable, with the distribution now stored in the column matching the response variable, and the forecast mean now stored in the .mean
column. For a complete summary of these changes, refer to the fabletools v0.2.0 release news: https://fabletools.tidyverts.org/news/index.html
THETA()
method.THETA()
method.mean()
, median()
, variance()
, quantile()
, cdf()
, and density()
.The lag
special is used to specify the lag order for the random walk process.
If left out, this special will automatically be included.
-lag(lag = NULL)
lag | The lag order for the random walk process. If lag = m , forecasts will return the observation from m time periods ago. This can also be provided as text indicating the duration of the lag window (for example, annual seasonal lags would be "1 year"). |
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
# S3 method for AR
-forecast(
+forecast(
object,
new_data = NULL,
specials = NULL,
@@ -83,15 +83,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -103,7 +103,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
diff --git a/dev/reference/forecast.ARIMA.html b/dev/reference/forecast.ARIMA.html
index 392020ce..fc5d9077 100644
--- a/dev/reference/forecast.ARIMA.html
+++ b/dev/reference/forecast.ARIMA.html
@@ -17,7 +17,7 @@
# S3 method for ARIMA
-forecast(
+forecast(
object,
new_data = NULL,
specials = NULL,
@@ -83,15 +83,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -103,7 +103,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -118,7 +118,7 @@ Examples
USAccDeaths %>%
as_tsibble() %>%
model(arima = ARIMA(log(value) ~ pdq(0, 1, 1) + PDQ(0, 1, 1))) %>%
- forecast()
+ forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
#> .model index value .mean
@@ -133,7 +133,7 @@ Examples
#> 8 arima 1979 Aug t(N(9.2, 0.0041)) 10132.
#> 9 arima 1979 Sep t(N(9.1, 0.0045)) 9138.
#> 10 arima 1979 Oct t(N(9.1, 0.0049)) 9391.
-#> # … with 14 more rows
+#> # ℹ 14 more rows
# S3 method for ETS
-forecast(
+forecast(
object,
new_data,
specials = NULL,
@@ -84,15 +84,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- simulate
@@ -108,7 +108,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -122,7 +122,7 @@ Value
Examples
as_tsibble(USAccDeaths) %>%
model(ets = ETS(log(value) ~ season("A"))) %>%
- forecast()
+ forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
#> .model index value .mean
@@ -137,7 +137,7 @@ Examples
#> 8 ets 1979 Aug t(N(9.2, 0.004)) 10252.
#> 9 ets 1979 Sep t(N(9.1, 0.0045)) 9169.
#> 10 ets 1979 Oct t(N(9.2, 0.005)) 9499.
-#> # … with 14 more rows
+#> # ℹ 14 more rows
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
If TRUE
, prediction intervals are produced by simulation rather than using analytic formulae.
If TRUE
, forecast distributions are produced by sampling from a normal distribution. Without simulation, forecast uncertainty cannot be estimated for this model and instead a degenerate distribution with the forecast mean will be produced.
If TRUE
, then forecast distributions are computed using simulation with resampled errors.
If TRUE
, forecast distributions are produced by sampling from the model's training residuals.
The number of sample paths to use in estimating the forecast distribution if simulated intervals are used.
The number of sample paths to use in producing the forecast distribution. Setting simulate = FALSE
or times = 0
will produce degenerate forecast distributions of the forecast mean.
Additional arguments for forecast model methods.
Other arguments passed to methods
as_tsibble(airmiles) %>%
model(nn = NNETAR(box_cox(value, 0.15))) %>%
- forecast(times = 10)
+ forecast(times = 10)
#> # A fable: 2 x 4 [1Y]
#> # Key: .model [1]
-#> .model index value .mean
-#> <chr> <dbl> <dist> <dbl>
-#> 1 nn 1961 t(sample[10]) 31555.
-#> 2 nn 1962 t(sample[10]) 32102.
+#> .model index value .mean
+#> <chr> <dbl> <dist> <dbl>
+#> 1 nn 1961 sample[10] 31085.
+#> 2 nn 1962 sample[10] 33936.
# S3 method for RW
-forecast(
+forecast(
object,
new_data,
specials = NULL,
@@ -84,15 +84,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- simulate
@@ -108,7 +108,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -122,7 +122,7 @@ Value
Examples
as_tsibble(Nile) %>%
model(NAIVE(value)) %>%
- forecast()
+ forecast()
#> # A fable: 2 x 4 [1Y]
#> # Key: .model [1]
#> .model index value .mean
@@ -132,8 +132,8 @@ Examples
library(tsibbledata)
aus_production %>%
- model(snaive = SNAIVE(Beer ~ lag("year"))) %>%
- forecast()
+ model(snaive = SNAIVE(Beer ~ lag("year"))) %>%
+ forecast()
#> # A fable: 8 x 4 [1Q]
#> # Key: .model [1]
#> .model Quarter Beer .mean
@@ -160,7 +160,7 @@ Examples
diff --git a/dev/reference/forecast.TSLM.html b/dev/reference/forecast.TSLM.html
index c058c520..ba2ed76a 100644
--- a/dev/reference/forecast.TSLM.html
+++ b/dev/reference/forecast.TSLM.html
@@ -17,7 +17,7 @@
# S3 method for TSLM
-forecast(
+forecast(
object,
new_data,
specials = NULL,
@@ -84,15 +84,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -112,7 +112,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -126,7 +126,7 @@ Value
Examples
as_tsibble(USAccDeaths) %>%
model(lm = TSLM(log(value) ~ trend() + season())) %>%
- forecast()
+ forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
#> .model index value .mean
@@ -141,7 +141,7 @@ Examples
#> 8 lm 1979 Aug t(N(9.1, 0.003)) 9237.
#> 9 lm 1979 Sep t(N(9, 0.003)) 8237.
#> 10 lm 1979 Oct t(N(9, 0.003)) 8516.
-#> # … with 14 more rows
+#> # ℹ 14 more rows
# S3 method for VAR
-forecast(
+forecast(
object,
new_data = NULL,
specials = NULL,
@@ -83,15 +83,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -103,7 +103,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -120,23 +120,23 @@ Examples
lung_deaths %>%
model(VAR(vars(mdeaths, fdeaths) ~ AR(3))) %>%
- forecast()
+ forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
-#> .model index .distribution .mean[,"…¹ [,"fd…²
-#> <chr> <mth> <dist> <dbl> <dbl>
-#> 1 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jan MVN[2] 1486. 575.
-#> 2 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Feb MVN[2] 1445. 558.
-#> 3 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Mar MVN[2] 1369. 528.
-#> 4 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Apr MVN[2] 1340. 505.
-#> 5 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 May MVN[2] 1327. 497.
-#> 6 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jun MVN[2] 1349. 505.
-#> 7 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jul MVN[2] 1395. 522.
-#> 8 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Aug MVN[2] 1442. 540.
-#> 9 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Sep MVN[2] 1477. 554.
-#> 10 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Oct MVN[2] 1495. 561.
-#> # … with 14 more rows, and abbreviated variable names ¹.mean[,"mdeaths"],
-#> # ²[,"fdeaths"]
+#> .model index .distribution .mean[,"mdeaths"]
+#> <chr> <mth> <dist> <dbl>
+#> 1 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jan MVN[2] 1486.
+#> 2 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Feb MVN[2] 1445.
+#> 3 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Mar MVN[2] 1369.
+#> 4 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Apr MVN[2] 1340.
+#> 5 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 May MVN[2] 1327.
+#> 6 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jun MVN[2] 1349.
+#> 7 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Jul MVN[2] 1395.
+#> 8 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Aug MVN[2] 1442.
+#> 9 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Sep MVN[2] 1477.
+#> 10 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1980 Oct MVN[2] 1495.
+#> # ℹ 14 more rows
+#> # ℹ 1 more variable: .mean[2] <dbl>
# S3 method for croston
-forecast(object, new_data, specials = NULL, ...)
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
# S3 method for fable_theta
-forecast(
+forecast(
object,
new_data,
specials = NULL,
@@ -83,15 +83,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -103,7 +103,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
@@ -118,7 +118,7 @@ Examples
USAccDeaths %>%
as_tsibble() %>%
model(arima = ARIMA(log(value) ~ pdq(0, 1, 1) + PDQ(0, 1, 1))) %>%
- forecast()
+ forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
#> .model index value .mean
@@ -133,7 +133,7 @@ Examples
#> 8 arima 1979 Aug t(N(9.2, 0.0041)) 10132.
#> 9 arima 1979 Sep t(N(9.1, 0.0045)) 9138.
#> 10 arima 1979 Oct t(N(9.1, 0.0049)) 9391.
-#> # … with 14 more rows
+#> # ℹ 14 more rows
# S3 method for model_mean
-forecast(
+forecast(
object,
new_data,
specials = NULL,
@@ -83,15 +83,15 @@ Forecast a model from the fable package
Arguments
- object
-The time series model used to produce the forecasts
+A model for which forecasts are required.
- new_data
-A tsibble
containing future information used to forecast.
+A tsibble containing the time points and exogenous regressors to produce forecasts for.
- specials
-(passed by fabletools::forecast.mdl_df()
).
+(passed by fabletools::forecast.mdl_df()
).
- bootstrap
@@ -103,7 +103,7 @@ Arguments
- ...
-Additional arguments for forecast model methods.
+Other arguments passed to methods
diff --git a/dev/reference/generate.AR.html b/dev/reference/generate.AR.html
index fc6f365c..2b94b85e 100644
--- a/dev/reference/generate.AR.html
+++ b/dev/reference/generate.AR.html
@@ -20,7 +20,7 @@
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
Additional arguments for forecast model methods.
Other arguments passed to methods
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
as_tsibble(USAccDeaths) %>%
model(lm = TSLM(log(value) ~ trend() + season())) %>%
generate()
-#> # A tsibble: 24 x 3 [1M]
-#> # Key: .model [1]
-#> .model index .sim
-#> <chr> <mth> <dbl>
-#> 1 lm 1979 Jan 7592.
-#> 2 lm 1979 Feb 6885.
-#> 3 lm 1979 Mar 7577.
-#> 4 lm 1979 Apr 7820.
-#> 5 lm 1979 May 8587.
-#> 6 lm 1979 Jun 8955.
-#> 7 lm 1979 Jul 9937.
-#> 8 lm 1979 Aug 9181.
-#> 9 lm 1979 Sep 8166.
-#> 10 lm 1979 Oct 8494.
-#> # … with 14 more rows
+#> # A tsibble: 24 x 4 [1M]
+#> # Key: .model, .rep [1]
+#> .model .rep index .sim
+#> <chr> <chr> <mth> <dbl>
+#> 1 lm 1 1979 Jan 7607.
+#> 2 lm 1 1979 Feb 6645.
+#> 3 lm 1 1979 Mar 7800.
+#> 4 lm 1 1979 Apr 7849.
+#> 5 lm 1 1979 May 8109.
+#> 6 lm 1 1979 Jun 9329.
+#> 7 lm 1 1979 Jul 10041.
+#> 8 lm 1 1979 Aug 9034.
+#> 9 lm 1 1979 Sep 7585.
+#> 10 lm 1 1979 Oct 8631.
+#> # ℹ 14 more rows
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
Additional arguments for forecast model methods.
Other arguments passed to methods
Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/dev/reference/interpolate.ARIMA.html b/dev/reference/interpolate.ARIMA.html index 69ce1966..fd37a9e7 100644 --- a/dev/reference/interpolate.ARIMA.html +++ b/dev/reference/interpolate.ARIMA.html @@ -17,7 +17,7 @@ @@ -76,19 +76,19 @@The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
TSLM
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
A tsibble
containing future information used to forecast.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
(passed by fabletools::forecast.mdl_df()
).
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
The time series model used to produce the forecasts
A model for which forecasts are required.
Additional arguments for forecast model methods.
Other arguments passed to methods
An object to be converted into a tidy tibble::tibble()
.
Additional arguments to tidying method.
An object to be converted into a tidy tibble::tibble()
.
Additional arguments to tidying method.