Guided tour on importing data files in EasyReg space delimited text format

Data files in EasyReg space delimited text format have the following structure:

k m
Name of variable 1
Name of variable 2
..................
Name of variable k
x(1,1) x(1,2) ... x(1,k)
x(2,1) x(2,2) ... x(2,k)
........................
x(n,1) x(n,2) ... x(n,k)

where 'k' is the number of variables, 'm' is the missing value code, 'n' is the number of observations, and x() is the data matrix. Numerical data are separated by at least one space. The data matrix x() may also be entered in vector form, with each data point x(t,i) on a separate line, or on one line only, as long as the order x(1,1) x(1,2) ... x(1,k),...... x(n,1) x(n,2) ... x(n,k) is preserved. The missing value code 'm' should be such that x(i,j) = m if and only if data point x(i,j) is a missing value, for example, set m = -99999. Set m = 0 if and only if there are no missing values. In the time series case missing values are only allowed at the beginning or the end of the time series. In the cross-section case missing values are allowed anywhere. The variable names may be of arbitrary length, and may contain spaces, numbers, etc. However, it is recommended to keep the variable names short.

This type of data file used to be the former default format of EasyReg data files. For this reason the EasyReg module involved is called DATAOLD. However, EasyReg now also supports Excel files in CSV format. See the guided tour involved.

Converting tab delimited text files to space delimited text files

EasyReg can handle tab delimited data files as well, as long as the tabs are the same as in Notepad.

If EasyReg gives an error message while reading an input file, the reason may be tabs that are not recognized. To convert such a tab delimited text file to a space delimited text file, import the file in Notepad, and find a tab between two entries: Put the mouse pointer just behind the first entry and push the right arrow button. If the mouse pointer jumps several positions to the next entry, there is a tab between the two entries. Next, copy the tab, open Edit > Replace, paste the tab in the "Find what" box, put a space in the "Replace with" box, and push the "Replace All" button.

Decimal delimiter

You may use either a dot (.) or a comma (,) as decimal delimiter. EasyReg will automatically convert the decimal numbers according to the current number setting of your Windows. It is for this reason that EasyReg is now called "EasyReg International".

Panel data

Panel data is treated by EasyReg as either cross-section data, where the same variables for different time periods are treated as different variables, or as time series data, depending on whether you have either large N / small T or small N / large T panel data, where N is the number of cross-sections and T is the length of the time series involved.

Large N / small T panel data

For example, if N > T, so that your data file is set-up as cross-section data, and if you have K variables for each cross-section j (j=1,..,N) and time period t (t=1,..,T), the EasyReg data file format is:

k m (k = K*T = number of variables, m = missing value code)
Name of variable 1 for t=1
....
Name of variable 1 for t=T
....
....
Name of variable K for t=1
....
Name of variable K for t=T
x(1,1,1) x(1,1,2) ...... x(1,1,T)
....
x(1,K,1) x(1,K,2) ...... x(1,K,T)
....
....
x(N,1,1) x(N,1,2) ...... x(N,1,T)
....
x(N,K,1) x(N,K,2) ...... x(N,K,T)

where x(i,j,t) is the data entry of variable j for cross section i and time t.

Large T / small N panel data

If T > N, so that your data file is set-up as time series data, the EasyReg data file format is:

k m (k = K*N = number of variables, m = missing value code)
Name of variable 1 for i=1
....
Name of variable 1 for i=N
....
....
Name of variable K for i=1
....
Name of variable K for i=N
x(1,1,1) x(2,1,1) ...... x(N,1,1)
....
x(1,K,1) x(2,K,1) ...... x(N,K,1)
....
....
x(1,1,T) x(2,1,T) ...... x(N,1,T)
....
x(1,K,T) x(2,K,T) ...... x(N,K,T)

where again x(i,j,t) is the data entry of variable j for cross section i and time t.

Importing a data file in EasyReg space delimited text format

Suppose that your have the following data file, DATAOLD.TXT, in the root of drive d:

EasyReg front
This is the famous Nelson-Plosser data set of 14 annual time series for the US, from 1860 to 1988. These time series are also included in the EasyReg data base.

We are going to import this file in EasyReg, as follows. In the EasyReg main window, click "File > Get data > Choose an EasyReg data file in space delimited text format". Then the following window appears.

DATAOLD window 1

There are two ways to search for data files of this type: by surfing your drive(s) and folders manually, or by file name or pattern. In the latter case you can scan your drives and folders automatically for files with this name or pattern. If you choose this option, the window changes to:

DATAOLD window 2

You can now type in the file name and click "OK" to search for this file.

However, we know the location and name of the file. Therefore, choose the option "surfing your drives" in the previous window, and click Start search. Then the window changes to:

DATAOLD window 3

Change the drive to d:, and double click d:\DATAOLD.TXT. Then the following window appears.

DATAOLD window 4

You have to tell EasyReg what the data type is: It is annual time series data. Thus, click "Annual time series data". Then the window changes to:

DATAOLD window 5

You have to tell EasyReg what the year of the first observation is: It is 1860. If your data are quarterly or monthly time series, you will also be prompted to enter the first quarter or month, respectively. Click "OK", or hit the enter key. Then the window changes to:

DATAOLD window 6

Click "Confirm". Then the window changes to:

DATAOLD window 7

Enter any comments on the data set involved, and click "Continue". Then the following window appears.

DATAOLD window 8

If the data file looks OK, click "Analyze further". Then the window changes to:

DATAOLD window 9

Click "Continue". Then the following window appears.

DATAOLD window 10

The data has now been copied to random access files INPUT1.RAN and INPUT2.RAN, as well as to a CSV file INPUT.CSV. This window enables you to check whether the conversion has been done correctly, by comparing data entries in the converted data file with the corresponding data entries in the CSV file. After checking the data, click "Continue". Then the following window appears.

DATAOLD window 11

Click "Continue". Then the following window appears.

DATAOLD window 12

In the guided tour on importing Excel files in CSV format, we had created a new folder d:\Test, and started up EasyReg there. We are now going to overwrite the data in d:\Test\EASYREG.DAT, by clicking "Start EASYREG in the current folder":

DATAOLD window 13

The current data are cross-section data, whereas the new data are annual time series data. Therefore, we have only two options: "Cancel", or "Overwrite". If you click "Overwrite", then the EasyReg main window appears, and you will be ready to use the new data.

If the existing data and the new data are of the same type, your will also have to option to merge the data sets. The option to merge data files will be demonstrated in the guided tour on how to retrieve data from the EasyReg database.

This is the end of the guided tour on importing data files in EasyReg space delimited text format

Back to the guided tour on how to import data.