diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ + diff --git a/404.html b/404.html new file mode 100644 index 0000000..a021239 --- /dev/null +++ b/404.html @@ -0,0 +1,91 @@ + + +
+ + + + +EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. ++ +
vignettes/rjd3nowcasting.Rmd
+ rjd3nowcasting.Rmd
Abstract
+ Nowcasting is often defined as the prediction of the present, the + very near future and the very recent past. This R package relies + on JDemetra+ v3.x algorithms to help operationalizing the process + of nowcasting. It can be used to specify and estimate Dynamic + Factor Models and visualize how the real-time dataflow updates + expectations, as for instance in Banbura + and Modugno (2010) +This package can be use to specify and estimate Dynamic Factor Models +in a very efficient way to provide consistent forecasts. Recent version +of the package also includes news analysis. Analyzing news, which are +defined as the discrepancy between the newly released figures and its +forecasts, helps to interpret forecast revisions. As mentioned by +Banbura and Modugno (2010), it enables us to produce statements like +“the forecast was revised up by … because of higher than expected +release of …”.
+This R package uses the efficient libraries of JDemetra+ v3. +The way the package was conceived is inspired by the GUI add-in +developed for JDemetra+ V2 and it provides about the same functionality +(except for the real-time simulation), but in the flexible R +environment.
+This package relies on the specific Java libraries of JDemetra+ v3 +and on the package rjd3toolkit of rjdverse. Prior the installation, +you must ensure to have a Java version >= 17.0 on your computer. If +you need to use a portable version of Java to fill this request, you can +follow the instructions in the installation +manual.
+In addition to a Java version >= 17.0, you must have a recent +version of the R packages rJava (>= 1.0.6) and RProtobuf +(>=0.4.17) that you can download from CRAN.
+The package rjd3nowcasting +depends on the package rjd3toolkit that you +must install from GitHub beforehand.
+
+
+# To get the current stable version (from the latest release):
+### install.packages("remotes")
+remotes::install_github("rjdverse/rjd3toolkit@*release")
+remotes::install_github("rjdverse/rjd3nowcasting@*release", build_vignettes = TRUE)
+
+# or to get the current development version from GitHub:
+remotes::install_github("rjdverse/rjd3nowcasting")
Note that depending on the R packages that are already installed on +your computer, you might also be asked to install or re-install some +other packages from CRAN.
+Once the package is loaded, there are four steps to follow:
+Detailed information concerning each step follows below the +example.
+
+# Quick start example
+
+## 1. Data
+
+set.seed(100)
+data0 <- stats::ts(
+ data = matrix(rnorm(500), 100, 5),
+ frequency = 12,
+ start = c(2010, 1)
+)
+data0[100, 1] <- data0[99:100, 2] <- data0[(1:100)[-seq(3, 100, 3)], 5] <- NA
+
+data1 <- stats::ts(
+ data = rbind(data0, c(NA, NA, 1, 1, NA)),
+ frequency = 12,
+ start = c(2010, 1)
+)
+data1[100,1] <- data1[99,2] <- 1
+
+
+## 2. Create or update the model
+
+### Create model from scratch
+dfm0 <- create_model(nfactors=2,
+ nlags=2,
+ factors_type = c("M", "M", "YoY", "M", "Q"),
+ factors_loading = matrix(data = TRUE, 5, 2),
+ var_init = "Unconditional")
+
+### Update model
+# ! Recall: due to potential presence of local minimum and lack of
+# identification issue, it is always better to start from a previously
+# estimated model when available.
+est0 <- estimate_em(dfm0, data0) # cfr. next step
+
+dfm1 <- est0$dfm # R object (list) to potentially save from one time to another
+# or, equivalently,
+dfm1 <- create_model(nfactors=2,
+ nlags=2,
+ factors_type = c("M", "M", "YoY", "M", "Q"),
+ factors_loading = matrix(data = TRUE, 5, 2),
+ var_init = "Unconditional",
+ var_coefficients = est0$dfm$var_coefficients,
+ var_errors_variance = est0$dfm$var_errors_variance,
+ measurement_coefficients = est0$dfm$measurement_coefficients,
+ measurement_errors_variance = est0$dfm$measurement_errors_variance)
+
+
+## 3. Estimate the model
+
+est1 <- estimate_ml(dfm1, data1)
+# or est1<-estimate_em(dfm1, data1)
+# or est1<-estimate_pca(dfm1, data1)
+
+
+## 4. Get results
+
+rslt1 <- get_results(est1)
+print(rslt1)
+fcst1 <- get_forecasts(est1, n_fcst = 2)
+print(fcst1)
+plot(fcst1)
+
+news1 <- get_news(est0, data1, target_series = "Series 1", n_fcst = 2)
+print(news1)
+plot(news1)
The data can be imported from anywhere. Then, it is required to
+create a time-series object by using the well-known
+stats::ts()
function like in the example.
In case of dynamic work, the columns of the dataset should remain the +same from one time to another and in the same order. Only additional +rows can be added reflecting the new data coming in.
+The function create_model()
enables you to build a new
+model.
The state-space representation of Dynamic Factor Model can be written
+as follows \[
+\begin{aligned}
+ y_t &= Z f_t + \epsilon_t, \quad \epsilon_t \sim N(0, R_t) \\
+ f_t &= A_1 f_{t-1} + ... + A_p f_{t-p} + \eta_t, \quad \eta_t \sim
+N(0, Q_t)
+\end{aligned}
+\] where the measurement equation links the observations to the
+underlying factors. Those factors, as shown in the second equation,
+follow a VAR process of order p. The number of factors to consider and
+the order p of the VAR process are to be defined in the first two
+arguments of the function create_model()
.
The third argument factors_type
defines the link between
+the series and the factors (Z matrix). This link can be more or less
+sophisticated depending on the variables. Three options are possible for
+the moment:
A variable expressed in terms of monthly growth rates can be +linked to a factor representing the underlying monthly growth rate of +the economy by defining the factor type as “M” for this variable +(default).
A monthly or quarterly variable that is correlated with the the +underlying quarterly growth rate of the economy can be linked to a +weighted average of the factors representing the underlying monthly +growth rate of the economy. Such a weighted average is meant to +represent quarterly growth rates, and it can be implemented by defining +the factor type as “Q” for this variable.
A variable can also be linked to the cumulative sum of the last +12 monthly factors. If the model is designed in such a way that the +monthly factors represent monthly growth rates, the resulting cumulative +sum boils down to the year-on-year growth rate. Thus, variables +expressed in terms of year-on-year growth rates or surveys that are +correlated with the year-on-year growth rates of the reference series +should be linked to the factors in this way. The factor type should be +defined as “YoY” in this case.
The fourth and last compulsory argument refers to the factors loading +that can incorporate zero restrictions. Users must mention there which +factors load on which variables.
+The argument var_init
tells whether the first unobserved
+factors values should be defined considering the unconditional
+distribution (recommended) or should be set equal to zero.
The last four arguments var_coefficients
,
+var_errors_variance
, measurement_coefficients
+and measurement_errors_variance
can be used to create a
+model based on a previous estimate of the model (see section Update an
+existing model). The default value of those four arguments is NULL
+meaning that the model will be created from scratch.
In case of dynamic work, a similar model was previously estimated
+based on an older version of the data. In that case, it is recommended
+not to create a new model from scratch but to start from the previously
+estimated model. For that, it must be made recoverable from the previous
+time. One option is to save the required information from one time to
+another using the base function saveRDS()
(see section 3 to
+know what exactly should be saved). Reasons for starting from a
+previously estimated model when available are faster convergence during
+the estimation step and the possibility to avoid running into another
+local minimum, resulting in parameters estimates that could potentially
+be very different from the previous time (especially since the model is
+not fully identifiable).
To generate a new model from a previously estimated one, there are +two possibilities:
+Set the new R object directly from the previous one, or
Use the function create_model()
while filling the
+arguments var_coefficients
,
+var_errors_variance
, measurement_coefficients
+and measurement_errors_variance
with their previously
+estimated values.
The function create_model()
returns a R object called
+‘JD3_DfmModel’. This is just a list of six elements that fully
+characterize the model. The list includes the estimated coefficient of
+the VAR equation and the variance-covariance matrix of the error terms,
+the estimated coefficient of the measurement equation and the
+idiosyncratic variance of the error terms, the type of initialisation
+and the link to consider between the series and the factor (i.e. the
+argument factors_type
). This is a R list of matrices and
+vectors that can easily be saved from one time to another using for
+example the function saveRDS()
.
Parameters can be estimated using different algorithms. One of the +three available functions should be picked for the purpose of +estimation:
+estimate_pca()
estimates the model
+parameters using only Principal Component Analysis (PCA). Although this
+is fast, this approach is not recommended, especially if some series are
+quarterly series or series associated to year-on-year growth rates (see
+section 2.1).estimate_em()
estimates the model
+parameters using the EM algorithm (with initial values given by PCA by
+default). The function includes a few optional arguments which can be
+used to tune the estimation process.estimate_ml()
estimates the model
+parameters by Maximum Likelihood (by default, with initial values given
+by the EM algorithm whose initial values are given by PCA). The function
+includes several optional arguments which can be used to tune the
+estimation process. The function estimate_ml()
is
+recommended, although it can be argued that the function
+estimate_em()
, which is somewhat faster, also constitutes a
+good solution.The three functions have two compulsory arguments which are necessary
+to estimate parameters: the model, i.e. an object of class
+‘JD3_DfmModel’ typically generated by the create_model()
+function, and the dataset which must be a mts
object. All
+three functions return the same R object, an object of class
+‘JD3_DfmEstimates’ that can be used as input for the results functions
+(see section 4). Note that the returned object is just a R list
+containing various elements.
In addition to the selected algorithm, estimation speed depends on +the size of the model. Models with one or two factors will be fastly +estimated (in a few seconds), also when the number of variables is +large. However, the estimation of more complex models may take minutes +to converge.
+Dynamic factor models require a prior standardization of the data. +This is an essential step which can lead to confusion in certain +situations. The usual mechanism is quite simple and is divided into +three stages:
+This means that both the likelihood of the model and the estimates of +the parameters, will be given by the transformed data. However, final +results like the forecasts and the forecasts errors variance of the +transformed series will be converted for the raw data.
+By default, the data are standardized. If, for some reasons, your
+dataset already contains standardized data, the standardization step can
+be skipped by defining standardized = TRUE
in the
+estimation function.
We need to pay particular attention to the standardization step when
+working dynamically. For instance, if you do not wish to re-estimate the
+model (see section 3.3), you must also provide the initial mean and
+standard deviation of each variables calculated at the time of the last
+estimation of the model. The argument input_standardization
+in each estimation function is for that purpose. Note that for news
+analysis (see section 4.3), the mean and standard deviation considered
+for the standardization step must be the same for the old and the new
+datasets. In practice, they are calculated based on the old dataset.
The three estimation functions include a boolean argument
+re_estimate
that indicate whether the model should be
+re-estimated (default) or not.
Note that for news analysis (see section 4.3), the model is kept
+unchanged between the previous and the current period to track the
+impact of news. Hence, to retrieve the same forecasts as those return by
+the get_news()
function, we should consider
+re_estimate = FALSE
and the previous standardization input
+should be added in the argument input_standardization
(see
+section 3.2).
In case of dynamic work, some R object should be passed from one time
+to another (see section 2.2). To do that, the user is invited to use the
+functions saveRDS()
and readRDS()
from base
+R.
What to save depends whether the intention of the user is to perform +news analysis.
+If the intention is not to perform news analysis and just to
+re-estimate the model each time and update the forecasts, only the
+estimated model should be saved from one time to another. This is an
+object of class ‘JD3_DfmModel’, generated as part of the output of the
+function estimate_pca()
, estimate_em()
or
+estimate_ml()
, where the default/previous estimates of the
+parameters are replaced by the new ones. The updated model is the
+element referred to as ‘dfm’ in the list returned by the estimation
+functions.
If the intention is to perform news analysis, the entire object/list
+returned by the function estimate_pca()
,
+estimate_em()
or estimate_ml()
, i.e. an R
+object of class ‘JD3_DfmEstimates’, should be saved. Optionally, a
+matrix with the standardization input used at the time of the initial
+estimate (i.e. the mean and standard deviation used to standardize data)
+can be saved as well. At the time of the initial estimate, the formatted
+matrix containing this information can be found in the preprocessing
+section of the output of the function get_results()
(see
+section 4.1). This could be used for instance to retrieve the
+concordance of the forecasts between the functions
+get_forecasts()
and get_news()
.
Results are split in three parts.
+The function get_results()
can be used to obtain results
+related to
The function get_results()
has a single argument which
+is an object of class ‘JD3_DfmEstimates’ typically generated by the
+function estimate_pca()
, estimate_em()
or
+estimate_ml()
. It returns an object of class
+‘JD3_DfmResults’ which is a list of the aforementioned output. A generic
+print()
function can be applied on its output and returns
+(by default) nicely formatted results related to the parameters
+estimates.
The function get_forecasts()
can be used to obtain
+forecasts of the variables, as well as the forecast errors standard
+deviation. You have access to both the forecasts of the transformed
+series (see section 3.2) and the raw series. As part of the output list,
+there is also extra output referred to as ‘forecasts_only’. Those are
+just an extract of the forecasts of the raw series which contains only
+the forecasts, i.e. where the rest of the series does not appear
+together with the forecasts.
The function get_forecasts()
has two arguments. One is
+an object of class ‘JD3_DfmEstimates’ typically generated by the
+function estimate_pca()
, estimate_em()
or
+estimate_ml()
. The other is the number of forecasting
+periods to consider, starting from the most up-to-date variable.
Two generic functions can be applied to the object returned by the
+function get_forecasts()
. A print()
function
+will return (by default) the forecasts only. A plot
+function can be used to visualize the series and the forecasts as well a
+80% prediction interval around the forecasts.
There are two kind of differences between two consecutive updates of +a dataset:
+The purpose of news analysis is to monitor the impact of (1) on the
+forecasts. Those impacts can be scrutinized in details by using the
+get_news()
function. This function displays the impact of
+the difference between the newly released figures and their forecast
+based on the revised figures (i.e. the old data + (2)).
The function get_news()
has four arguments:
estimate_pca()
,
+estimate_em()
or estimate_ml()
. As the purpose
+of news analysis is to monitor the impact of newly released figures on
+forecasts, the model is kept unchanged between the previous and the new
+release. Hence, the previously estimated model should be the one
+specified here. Note that the pre-standardization of the data (see
+section 3.2) is also calculated based on the previous release.mts
+objectThe list of output returned by the function get_news()
+contains the weights of the news, their impact and the forecasts for
+both the transformed (see section 3.2) and the raw series. The weights
+given to each news represent their relevance for the variable of
+interest. The impacts are the weights of the news times their size. They
+give the impact of each piece of news on the forecast revisions of the
+variable of interest. Therefore they allow users to understand how the
+revisions can be decomposed in terms of the news components for the
+various series. The generic plot()
function can be used
+directly on object of class ‘JD3_DfmNews’ (i.e. object generated by the
+function get_news()
) to quickly visualize all impacts with
+a nicely formatted barchart. This is similar to what was included in the
+GUI add-in of
+JDemetra+ V2.x.
Finally, the forecasts returned by the function
+get_news()
include:
In addition to the plot()
function, there are two more
+generic functions that can be applied to an object of class
+‘JD3_DfmNews’. The function summary()
will give you a
+summary of the weights and impacts of each news on the variable of
+interest for each forecasting period. The print()
function
+returns the same table as the summary()
function together
+with the information related to the forecasts.