8 The Software Jmulti: Markus KR Atzig
8 The Software Jmulti: Markus KR Atzig
8 The Software Jmulti: Markus KR Atzig
Markus Krätzig
289
P1: IML
CB698-Driver CB698-LUTKEPOHI CB698-LUTKEPOHI-Sample.cls August 25, 2006 17:44
8.2.1 Numbers
JMulTi stores numbers as 64-bit, double-precision, floating point values as
defined in IEEE (754–1985). Special values are NaN, Infinity and -Infinity.
NaN stands for Not-a-Number and is used to code missing values in data files.
Infinities are not allowed for data points but occur in the definition of intervals
or for coding special values.
To input numbers that are used by a procedure, JMulTi provides special
text fields with input-validating capabilities. Usually these text fields display a
reasonable default value. The decimal delimiter is a point. The number displayed
is rounded to the precision required for the respective purpose. Very often the
number of fraction digits is zero, which allows only for integer input. If the
given value cannot be parsed to a number or if it is not in the allowed range, a
descriptive message will pop up and any other action is canceled. It is always
possible to input values coded in exponential notation (e.g., 1.234e-10). The
respective text field formats the input value in a way that makes sense for the
given context.
2 The Sun JRE can be downloaded from http://www.java.sun.com.
P1: IML
CB698-Driver CB698-LUTKEPOHI CB698-LUTKEPOHI-Sample.cls August 25, 2006 17:44
8.2.3 Dates
In JMulTi dates are objects defined by a main period, a frequency, and a sub-
period. They can be specified in various ways with the respective text fields for
date input. All three pieces of information must be retrieved from the input.
The following formats are recognized, where D stands for the main period, S for
the subperiod, and F for the frequency or periodicity:
• D S/F, for example 1960 1/6. This format is always possible and is used
as default format if no special identifier for the frequency is defined.
• D ’Q’ S, for example 1960 Q 1. This format is used for quarterly data.
• D ’M’ S, for example 1960 M 11. This format is used for monthly data.
• D, for example 1960. This format is used for annual data.
• D [’I’,’II’], for example 1960 II. This format is used for half-yearly
data.
• D.S, for example 1960.1. This format is just for input convenience and can
be used when the program already knows the frequency from the context,
which is often the case.
Date input must conform to the given rules and is validated against a range
defined by two dates. If the input is wrong in any way, the previous value is
restored and a descriptive message is shown.
well. Like the ones for number ranges, they are marked with angular brackets
and validated against an enclosing date range. The two dates must be separated
by a comma.
right clicks over selected variables in the time series selector. The tasks in the
pop-up menu do not take the selected range into account but always operate on
the whole range of the selected time series.
The time series selector is used to select the set of variables, the order of the
variables, and the time range for the various econometric methods and models.
The respective selection is only valid within its context (e.g., for unit root tests).
The selection made there has no influence on the model selection – for instance
for a VAR model. The selection mechanism is also adjusted to its context, which
means that only one variable can be selected for unit root tests, whereas for VAR
modeling the number of variables is not restricted.
Sometimes the ordering of the variables is important for a model or for
analysis. The selector uses the order in which the variables have been clicked
on. For multiple selection, it is necessary to keep either the Shift or the Ctrl
button depressed while the mouse is clicked over a series. The selected variables
are displayed in the correct order in the control area of the selector after the
selection has been confirmed.
The time range of the selection can be adjusted by editing the respective
text field. The valid range is the largest common range of all selected time se-
ries, where NaN missing values have been automatically truncated from the
beginning and the end of each series. The smallest legal range must con-
tain two observations. Once a range selection is made, this selection is kept
as long as it is valid. The maximum possible range can easily be set via
a button. This mechanism enables the user to keep an edited time range
as long as possible but allows a quick switch back to the maximum range
as well.
In general, all variable names in JMulTi are case insensitive, which means
that there is no distinction between, say, GNP and gnp. However, the variables
in the selector are displayed as they have been read in or named with the case
of the characters unchanged.
The time series selector displays variables with their names and with a symbol
tagging their property. Within the context of time series analysis the three possi-
ble properties are endogenous, exogenous, and deterministic. Through
these properties variables can be grouped and treated differently by a certain
procedure or model. It is possible to change the property of a variable via the
right mouse menu. The following tasks are available through this pop-up menu
as well:
Delete. All selected time series can be deleted. This operation is also accessible
by pressing the Del key.
Rename. The first selected time series can be renamed. The new name must be
unique among all time series in the list. The rules for variable names described
earlier apply.
P1: IML
CB698-Driver CB698-LUTKEPOHI CB698-LUTKEPOHI-Sample.cls August 25, 2006 17:44
Editing time series. The selected time series can be edited as well. Changes
are only stored if the dialog is confirmed with OK. If series with different ranges
are selected, the missing values at the beginning or the end are displayed with
NaN.
Exporting data. It is possible to combine the selected time series with a new
data set that will be saved in the .dat format described earlier. The data set can
then be read in again without further interaction.
1. First one has to select the variables to be combined in the time series selector.
2. The names appear in the list Available Variables and are put into the
variable space of the calculator.
3. One can write one or more commands to the command area and execute
them with Execute or Ctrl+E. Newly created variables appear in the list
of available variables.
4. Finally, the selected variables in Available Variables can be added to
the workspace with Add Selected.
The syntax of TSCalc is very easy, and only a few simple rules apply:
By double clicking on a variable in the list, the name appears in the command
window and can be combined with commands from the calculator. Apart from
basic arithmetic operations, TSCalc provides a range of other functions like
sin, cos, tan, min, max, lagn, log, stdc, meanc, rndn, ones, trend. For
a complete list of possible operators and functions, consult the help system.
In case there are syntax errors, a descriptive message is printed to the output
window. If the selection in the time series selector is changed, the workspace of
the calculator is overwritten. Variables that have not been added to the workspace
are lost.
other hand, the system is flexible enough to serve as a platform for more de-
manding applications as well. The technical details of how to implement this
capability are not described here, but the general idea of the underlying frame-
work is presented. For more information the interested reader is referred to the
homepage3 of the project.
The task of creating the JAVA application on the other hand is greatly sim-
plified by the framework design of JStatCom. Many sophisticated classes and
components are available and can easily be reused. The general functional-
ity described earlier in this chapter is immediately available if the respective
components are used. As a developer, one only needs to think about the special
needs of a certain procedure, which basically means input and output specifi-
cation. Although some programming in JAVA is always needed, most steps can
be done in a standardized way.
The design splits the complex task of creating an application for time se-
ries analysis into smaller units, which can be solved separately. The problems
that occur in literally every analysis have been solved in the JAVA framework
already. The task of creating the GUI and the task of programming a complex
statistical procedure are almost completely separated and can even be done by
different people. That way it is possible to reuse already written code efficiently
and to enhance its value by integrating it with a graphical user interface.
8.7 Conclusion
JMulTi uses the functionality of JStatCom to implement interesting, new,
and otherwise difficult-to-use methods in time series econometrics. It is freely
available, using free code provided by many authors.
On the other hand, the development of JStatCom would not at all have
been possible without the experiences gained from creating, using, and extend-
ing JMulTi. The framework is an extract of all general solutions that have been
found to be useful and are not related to a specific model but occur frequently
when implementing new methods. Both pieces of software will, it is hoped, con-
tinue to be improved, maintained, and extended with new features in the future.
It is likely that the software will change much faster than this book; therefore,
users are advised to check the respective websites for the latest developments.
P1: IML
CB698-Driver CB698-LUTKEPOHI CB698-LUTKEPOHI-Sample.cls August 25, 2006 17:44
300