DDI2StatsProgs
A data definition command generator on the basis of DDI
documents.
DDI2StatsProgs is a flexible tool to generate data definition commands
for statistical programs and databases on the basis of DDI 2 documents. In
the current state command setups can be created for SAS,
SPSS, STATA,
R Language, and
ANSI-SQL.
DDI2StatsProgs provides a generic approach to generate program-specific
definitions from variable-level metadata (DDI); it is template driven.
The specific syntax of a statistical program is separated from the tool
itself. This approach enables users to change the desired data
definition commands (i.e. SPSS) easily without further technical
knowledge (XSLT).
By this simplified way it is possible to define rapidly new templates
for additional statistical programs.
How does it work?
DDI2StatsProgs is a XSL style sheet which uses variable-level
information from a DDI 2 document. This information will be formatted
accordingly a syntax template for a specific statistical program. The
syntax templates are mixed with keywords. The content for these keywords
is fed by the DDI document. Example clipping from the SPSS template:
| |
* Definition
of variable labels .
variable labels
<VariableLoop>
<VariableName/>
"<VariableLabel/>"
</VariableLoop>
. |
Overview Diagram

What are the prerequisites?
Valid DDI 2 documents are required as input. The DDI2StatsProgs
stylesheet can be applied by any XSLT processor like XSLTProc, Saxon, or
Xalan.
Status
The current state (beta) generates correct syntax files for the
mentioned target programs. If using other data formats than numeric data
in ASCII files, it will be sometimes necessary to edit accordingly the
format specification in the generated syntax file. This is a structural
limitation due to the lax definition of data formats in DDI version 2.
Future plans
Adaptation to the new DDI version 3.0 is planned.
Examples
See the generated data definition command setups
for the German Microcensus 2004 available as
SAS,
SPSS, and
STATA.
Download
DDI2StatsProgs will be available under the terms of the
GNU General Public License in July 2006. Look at the alpha preview:
http://www.gesis.org/en/software/ddi/tools/ddi2statsprogs/DDI2StatsProgs.zip
Syntax Templates
Additional syntax templates can be easily written based on the existing ones. Contribution
of templates for other target programs is welcome and will be included
in future versions.
© GESIS Joachim Wackerow
2006-05-22