|
Before we can estimate equation (12.3) we have to load the XploRe quantlib metrics for panel data analysis. This is easily be done by typing
library("metrics")The complete XploRe code needed for the subsequent analysis is included in the quantlet
The data matrix must be organized in the following form:
1 | 2 | 3 | 4 | ![]() |
3+![]() |
1 | 1 | ![]() |
![]() |
![]() |
![]() |
&vellip#vdots; | &vellip#vdots; | ||||
1 | ![]() |
![]() |
![]() |
![]() |
![]() |
2 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Next we load the panel data from the data file uippanel.dat :
z=read("uippanel.dat")This example data set has already the appropriate format for the following analysis. To clarify the structure of a XploRe panel data set we have reproduced rows 20 to 25 from the UIP data:
[ 20,] 1 92 95.217 -1.3578 2.1699 [ 21,] 1 93 97.091 -1.3401 1.3319 [ 22,] 1 94 96.962 -2.7027 -0.51471 [ 23,] 1 95 100 -1.0097 -0.20261 [ 24,] 2 73 87.671 1.2726 -0.07492 [ 25,] 2 74 89.041 0.51274 0.3582The first column is the index of a specific country, e.g. 1 corresponds to Austria and 2 to Belgium (see Table 12.1 for all country codes). The second column contains the year of the observations and hence is the time index. Real effective exchange rate index is given in column three. This index measures the purchasing power relative to the OECD average. The base year of this index is 1995.
In the fourth column of the data set we find the long-term interest rate differential defined as the difference between the long-term domestic real interest rate and its foreign counterpart. The foreign interest rate corresponds to a weighted average of long-term real interest rates from 17 industrial countries. More precisely, this average is computed from interest rates of the fifteen European Union members, Canada, Japan and the United States left out the country the spread is computed for.
Finally, the fourth column is the short-term real interest spread, i.e. the difference between the domestic short-term interest rate and the foreign short term rate. Again, the foreign interest is constructed by the procedure characterized above.
To detect missing values or potential problems with the data we highly recommend to first compute summary statistics for the panel. In XploRe this is conveniently done by typing
panstats(z)where z is the data set. For the UIP data the output turns out to be:
[1,] [2,] N*T: 378, N: 16, Min T(i): 17, Max T(i): 26 [3,]---------------------------------------------------------- [4,] Minimum Maximum Mean Within Var.% Std.Error [5,]---------------------------------------------------------- [6,] 30.96 638.9 117.1 54.74 67.37 [7,] -13.77 9.852 0.3543 70.82 3.082 [8,] -15.13 8.324 0.2948 79.63 2.978 [9,]The summary table gives an informative overview of the data set properties. First, we can easily see that there are 16 countries included. Next and perhaps more interesting is the fact that the UIP panel is unbalanced. The data set includes at most 26 observations from 1973 to 1998, however, for some countries the interest rate spread is not available for the whole period. These missings have been deleted prior to this analysis such that the resulting data set is unbalanced.
The column "within Var.%" gives the fraction of variance due to the within-group deviations. A zero in this column implies that the respective variable is constant over time. This is an important information for the estimation of fixed effects models. Not surprisingly, in our example macroeconomic data set none of the variables is constant over time. Since there are no missings and no other problems with the data, we proceed with a fixed effects model.