12.2 The Data


z = 22279 panstats (z{, T})
computes summary statistics for the variables

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 22292 pantlet.xpl . Next we load the data set to XploRe . In general, a panel data set is assumed to be ordered by the cross-section units. (If the data are ordered according to the time index, the 22299 pansort quantlet can be used to reorganize the data.) That is, the complete data of the first individual is given in the first $ T_1$ rows, then the data of the second individuals in the rows $ T_1+1,\ldots,T_1+T_2$ and so on. If the data set is unbalanced, the first two columns must provide the identification number of the cross-section unit and the time period. If the data are in balanced panel form, it is sufficient to provide the common number of time periods $ T$ to assign the data to the cross-section units.

The data matrix must be organized in the following form:

1 2 3 4 $ \cdots$ 3+$ m$
1 1 $ y_{11}$ $ x_{11,1}$ $ \cdots$ $ x_{11,m}$
&vellip#vdots;         &vellip#vdots;
1 $ T_1$ $ y_{1 T_1}$ $ x_{1 T_1,1}$ $ \cdots$ $ x_{1 T_1,m}$
2 $ 1$ $ y_{21}$ $ x_{21,1}$ $ \cdots$ $ x_{21,m}$
$ \vdots$         $ \vdots$
The first and the second column provide the cross-section identification number and the time period respectively. $ y_{it}$ in the third column is the dependent variable, whereas the next $ m$ columns contain the explanatory variables. For more details on the panel data set structure needed by XploRe see the XploRe Learning Guide (Section 12.4.1).

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.3582
The 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.