-
Notifications
You must be signed in to change notification settings - Fork 11
Build Model
Here we show how to generate a model, in a few simple steps:
Go to the menu STATISTICAL METHODS and select the option Nowcasting. Select the type of nowcasting model desired. For example, "dynamic factor models".
As suggested earlier, the data can be uploaded from various sources. Select the sheets that contains your data and copy each series or the whole sheet into the model space (use the drag and drop
command).
Your newly created nowcasting model has two factors by default. Below, we describe the options to link the data to those two underlying factors. We also describe how to change the number of factors and other options.
The so-called state-space representation of the factor model is written as follows:
where the measurement equation links the N observables to the r underlying factors. Those factors, as shown in the second equation, follow a VAR of order p. This representation is valid in the case of missing observations or when monthly and quarterly variables are combined. In the latter case, it is simply assumed that the quarterly values are observed every three months.
In this example we have variables observed at the monthly and quarterly frequencies. There is the option to transform the series in multiple ways, including first differences or seasonal adjustment. The likelihood of the model which is will be important for the estimation, will be given by the transformed data. However, the forecasts will be calculated for the raw data.
The link between the transformed time series and the factors can be very sophisticated. Three options are possible for the moment:
- Variables expressed in terms of monthly growth rates can be linked to a factor representing the underlying monthly growth rate of the economy if "M" is selected
- Monthly or quarterly variables that are 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 is implemented by selecting "Q":
- The variables 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 using this link:
The factor loading structure can incorporate zero restrictions. Users should simply select which factors load on which variables. The following example helps to define a measurement equation for a very simple model for nowcasting German GDP:
The so-called transition equation is a representation of the r underlying factors in terms of a vector autoregressive model of order p. Both parameters can be determined by clicking on the tools
option of Model tab.
The first unobserved factors in the sample is assumed either to be equal to zero or be consistent with a normal distribution with mean zero and a variance consistent with the unconditional variance of the VAR.
-
The workspace can be saved by clicking on the FILE menu and selecting "save as". Let's first save the workspace with the name "NowGermany_24_11_2015", in reference to today's date.
-
The name of our new model residing in our workspace ("Dfm1", by default) can be easily changed by applying the
right click
command. Select "Rename". Call it "Model r=2, p=3", in reference to the fact that the correlation among all variables is exclusively due to r=2 factors, which follow a VAR(p) of order p=3.
As shown in the video, one may want to build a new model with identical properties as the previous one, but with one extra factor that loads on a variable that could be important for the German business cycle (this hypothesis can be tested). Go to the workspace window and right click
on the model you want to modify. Select "Clone".
You can see that a new model will be added to the list of models that already exist inside your workspace. Proceed as before (right click
) with this new model, and select the option "Rename". Call it "Model r=3, p=3", in reference to the fact that it has now three factors following a VAR(3).
An XML file with name "NowGermany_24_11_2015" is created. Such a file can be opened with JDemetra+. The file will access a folder with the same name that contain the two models we have specified, including the data.