User Interface

9    User Interface


9.1  General Concept

The WinIDAMS User Interface is a multiple document interface. It can display and allow to work simultaneously with different types of documents such as Dictionary, Data, Setup, Results and any Text document in separate windows. Moreover, it provides access to execution of IDAMS setups and to components for interactive data analysis, namely: Multidimensional Tables, Graphical Exploration of Data and Time Series Analysis from any document window. The WinIDAMS Main window contains:

The menu bar and the toolbar have fixed, document dependent contents. The common menus are described below while document type dependent menus are described in relevant sections.

9.2  Menus Common to All WinIDAMS Windows

The main menu bar contains always the seven following menus: File, Edit, View, Execute, Interactive, Window and Help.

File

New 
Calls the dialogue box to select the type of document to be created, and to provide its name and location.
Open 
After choosing the type of document, calls the dialogue box to select the document to be opened.
Close 
Closes the active window.
Save 
Saves the document displayed in the active window.
Save As 
Calls the dialogue box to save the document in the active window.
Print Setup 
Calls the dialogue box for modifying printing and printer options.
Print Preview 
Displays the active document as it will look when printed.
Print 
Calls the dialogue box for printing the contents of the document displayed in the active pane/window. Note that hidden parts of the document are not printed.
Exit 
Terminates the WinIDAMS session.
The menu can also contain the list of up to 7 recently opened documents, i.e. documents used in previous WinIDAMS sessions.

Edit

The availability and sometimes the title of some commands in this menu may be different in different windows.

Undo 
Cansels the last action.
Redo 
Does again the last canceled action.
Cut 
Moves the selection to the Clipboard.
Copy 
Copies the selection to the Clipboard.
Paste 
Copies the Clipboard content to the place where the cursor is positioned.
Find 
Starts the Windows searching mechanism.
Replace 
Starts the Windows replacing mechanism.
Find again/next 
Looks for the next appearance of the character string displayed in the Find dialogue box.
Note that in the Results and Text windows, the search/replace actions are activated by the Search, Search Forward, Search Backward and Replace commands.

View

Toolbar 
Displays/hides toolbar.
Status Bar 
Displays/hides status bar.
Application 
Displays/hides the Application window.
Show Full Screen 
Displays the active window in full screen. Click the Close Full Screen icon in the left-top corner or press Esc to go back to the previous screen.

Execute

With exception of the Setup window, the menu has only one command, Select Setup, to select a file with the setup to be executed.

Interactive

Through this menu, three components for interactive analysis can be accessed, namely:

Multidimensional Tables 
Graphical Exploration of Data 
Time Series Analysis 
See relevant chapters for a detailed description of each component.

Window

The menu contains the list of opened windows and standard Windows commands for arranging them.

Help

WinIDAMS Manual 
Provides access to the WinIDAMS Reference Manual.
About WinIDAMS 
Displays information about the version and copyright of WinIDAMS and a link for accessing the IDAMS Web page at UNESCO Headquarters.

9.3  Customization of the Environment for an Application

Names of Data folder, Work folder and Temporary folder can be defined by the user and saved in an Application file with the application name as filename. The name of the last application used is stored by the system and the settings defined for this application are loaded at the beginning of the following session. These settings can be changed any time during the working session by selecting/creating and activating another application.

Since at least one Application file is necessary for the use of WinIDAMS, a standard application called "Default" is provided and will be activated when you start WinIDAMS for the first time after installation. Defined default settings are the following:

Data folder <system_dir>\data
Work folder <system_dir>\work
Temporary folder <system_dir>\temp

where <system_dir> is the System folder name fixed during the installation. This application (stored in the file Default.app) should neither be deleted nor modified by the user.

Application files (except Default.app) can be created, modified or deleted by the user through the Application menu in the WinIDAMS Main window. It contains the following commands:

New 
Calls the dialogue box for creating a new application.
Open 
Calls the dialogue box to select the file containing details of the application to be opened.
Display 
Calls the dialogue box to select the application file and displays the application settings.
Close 
Closes the active application and opens the Default application.
Refresh 
Recreates the current application tree.

Creating a new application. Selection of the menu command Application/New provides a dialogue box for entering the name of a new application as well as names of Data, Work and Temporary folders. Except the application name field which is empty, all the other fields contain default values taken from the Default application. You can type in the pathname directly or select it moving the highlight to the required name in the displayed tree of folders.


Press OK button to save the application. Pressing Cancel cancels the creation of a new application and returns to the WinIDAMS Main window with the settings displayed previously.

Opening an application. The menu command Application/Open calls the dialogue box to select an application file to be opened and provides a list of existing applications in the Application folder. Clicking the required file name activates the settings for this application.

Modifying an application. To modify an application, first open it and then change the values in the same way as for creating a new application.

Displaying the settings for an application. Use the menu command Application/Display to call the dialogue box and click the required file name.

To display settings for the active application, double-click its name in the Application window.

Deleting an application. It can be done by deleting the corresponding file. Use the menu command Application/Open to get a list of Application files, select the file to delete and use the right button to access the Windows Delete command. The file Default.app should not be deleted.

Resetting WinIDAMS defaults. To replace the displayed application by the default application you can either close it using the menu command Application/Close, or select and open the Default.app file.

Closing an active application. Use the menu command Application/Close. The default application becomes active.

IDAMS programs use the paths defined in the application to prefix any filename not beginning with "<drive>:\... " or with "\... "

Examples:

Data folder:                    c:\MyStudy\students\data
Specification in the setup:     dictin=students2004.dic
Complete dictionary file name:  c:\MyStudy\students\data\students2004.dic

9.4  Creating/Updating/Displaying Dictionary Files

The Dictionary window to create, update or display an IDAMS dictionary is called when:


This window provides two panes: one for the variable definitions (Variables pane) and another for the codes and code labels of the current variable (Codes pane). A blue line at the top of each pane indicates which pane is active.

The column headings in the Variables pane have following meaning:

Number 
Variable number.
Name 
Variable name.
Loc, Width 
Starting location and field width of the variable in the Data file.
Dec 
Number of decimal places; blank implies no decimal places.
Type 
Type of variable (N = numeric, A = alphabetic).
Md1 
First missing data code for numeric variables.
Md2 
Second missing data code for numeric variables.
Refe 
Reference number.
StId 
Study ID.
For more details, see section "The IDAMS Dictionary" in "Data in IDAMS" chapter. Note that only dictionaries describing data with one record per case can be created, updated or displayed using the Dictionary window.

Changing the pane appearance. The appearance of each pane can be changed separately and the changes apply exclusively to the active pane.

The following modification possibilities are available in each pane:

The Variables pane can further be modified as follows:

Defining a variable. Place the cursor in the Variables pane, fill the variable number (at least one is mandatory, subsequent variables will be numbered by adding the value 1), name (optional), location (if not supplied, 1 will be assigned to the first variable and for subsequent variables, location will be calculated by adding the width of the preceding variable) and width (mandatory). Other fields have default values (which you can either accept or modify) or they are optional and can be left blank. Press Enter or Tab to accept a value in a field and move to the next field, or Shift/Tab to move to the previous field. Note that as long as a little pencil appears in the row heading, the row is not saved. Press Enter to accept the complete variable definition. An asterisk in the row heading indicates that this is the next row and you can enter a new variable description.

Defining the codes and code labels for a variable. Switch to the Codes pane and fill the code and label fields. Fill in the code value, then press Enter or Tab and fill the code label, then Enter or Tab to accept the row and move to the next row. When all codes and labels have been defined, switch back to the Variables pane to continue with another variable definition.

Modifying a field in either Variables pane or in Codes pane. Click the field and enter the new value (entering the first character of the new value clears the field). After a double-click on a field, its current value can be partly modified. The Esc key may be used to recuperate previous value.

Editing operations can be performed on one row or on a block of rows. To mark one row, click any field of this row. A triangle appears in the row heading and the row is coloured in dark blue. To mark a block of rows, place the mouse cursor in the row heading where you want to start marking and click the left mouse button. The row becomes yellow, indicating that it is active. Then move the mouse cursor up or down to the row where you want to end marking and click the left mouse button holding the Shift key. Marked rows become dark blue, and the yellow colour shows the active row.

You can Cut, Copy and Paste marked row(s) using the Edit commands, equivalent toolbar buttons or shortcut keys Ctrl/X, Ctrl/C and Ctrl/V respectively.

Using the right mouse button you can Insert Before, Insert After, Delete or Clear the active row (even when a block of rows is marked).

Detecting errors in a dictionary. Use the menu command Check/Validity. Errors are signaled one by one and can be corrected once they have all been displayed. Moreover, Interface tries to prevent you from saving dictionaries with errors. Also, when you open a dictionary with errors, their presence is signaled before the dictionary is actually opened.


9.5  Creating/Updating/Displaying Data Files

The Data window is used to create, update or display an IDAMS Data file. Note that the corresponding Dictionary file must already have been constructed and that only Data files with one record per case can be created, updated or displayed using the Data window. This window is called when:


The window is divided into 3 panes: one displaying the codes and code labels of the current variable (Codes pane), the second displaying variable definitions (Variables pane) and the third providing place for data entry/modification (Data pane). Only the Data pane can be edited. The other two panes just display the relevant information. A blue line at the top of each pane indicates which pane is active. The panes are synchronized, i.e. selection of a variable field in the Data pane highlights the corresponding variable description, and selection of a field in the Variables pane shows the corresponding variable value in the current case. For the selected variable, codes and code labels (if any) are always displayed.

Changing the pane appearance. The appearance of each pane can be changed separately and the changes apply exclusively to the active pane.

The following modification possibilities are available in all panes:

The Data pane can be modified further as follows: Entering a new case. Click the first field in an empty row and start entering data values. Press Enter or Tab to accept a data value for the variable and move to the next variable, or Shift/Tab to move to the previous variable. Note that as long as a little pencil appears in the row heading, the case is not saved. Pressing Enter on the last variable saves the case and moves the cursor to the beginning of next row. A new row can be inserted before or after the highlighted row (click on the right mouse button), or can be added at the end of file (row with an asterisk in the row heading).

Data entry can be facilitated taking advantage of two options given in the Options manu:

Code Checking 
checks data values during data entry against codes defined in the dictionary, being the only codes considered valid.
AutoSkip 
moves the cursor automatically to the next field once enough digits have been entered to fill the field. If not selected, you have to press Enter or Tab to move to the next field.
Modifying a variable value. Click the variable field and enter the new value (entering the first character of the new value clears the field). A double-click on a variable field can be used to modify part of the current value. The Esc key may be used to recuperate the previous value.

Copying a variable value to another field. Click the variable field and copy its content to the Clipboard (Edit/Copy command, Ctrl/C or Copy button in the toolbar). Then click the required field and paste the value (Edit/Paste command, Ctrl/V or Paste button in the toolbar). The menu command Edit/Undo Case may be used to recuperate the previous value.

Editing operations on one row or on a block of rows can be performed in the same way as in the Dictionary window. To mark one row, click any field of this row. A triangle appears in the row heading and the row is coloured in dark blue. To mark a block of rows, place the mouse cursor in the row heading where you want to start marking and click the left mouse button on. The row becomes yellow, indicating that it is active. Then move the mouse cursor up or down to the row where you want to end marking and click the left mouse button holding the Shift key. Marked rows become dark blue, and the yellow colour shows the active row.

You can Cut, Copy and Paste marked row(s) using the Edit commands, equivalent toolbar buttons or shortcut keys Ctrl/X, Ctrl/C and Ctrl/V respectively.

Using the right mouse button you can Insert Before, Insert After, Delete or Clear the active row (even when a block of rows is marked).

Two data management commands are provided in the Management menu to allow for data verification and sorting:

Check Codes 
checks data values for all cases in the Data file against codes defined in the dictionary, being the only codes considered valid. At the end of verification, a message showing the number of errors found is displayed and you are invited to correct them one by one using the data correction dialogue box. This box provides case sequential number, variable number and name, invalid code value and a drop-down list of valid codes as defined in the dictionary.
Sort 
calls the sort dialogue box to specify up to 3 sort variables and corresponding sort order for each of them. After clicking OK, the sorted file appears in the Data pane.
Sorting the data on one variable (one column) can also be done by a double-click on the variable number in the Data pane heading. One double-click sorts cases in ascending order. To get the sort in descending order, repeat the double-click.

Two types of graphics are proposed for a variable in the menu Graphics.

Bar Chart provides a bar chart based on either frequencies or percentages for qualitative variable categories. For quantitative variables, the user defines the number of bars (NB) on both sides of the mean (M) and a coefficient (C) for calculating bar (class) width. The bar width (BW) is equal to the value of standard deviation (STD) multiplied by the coefficient (BW=C*STD). The bars are constructed using the values
M-NB*BW, ..., M-2BW, M-BW, M, M+BW, M+2BW, ..., M+NB*BW. The height of a rectangle = (relative frequency of class)/(class width). In addition, normal distribution curve having the calculated mean and standard deviation can be projected for quantitative variables.

Histogram , meant for quantitative variables, provides a histogram based either on frequencies or on percentages with the number of bins specified by the user.

Graphics for quantitative variables contain also univariate statistics for the projected variable such as: mean, standard deviation, variance, skewness and kurtosis. Variables with decimal places are multiplied by a scale factor in order to obtain integer values. In this case, mean value, standard deviation and variance should be adjusted accordingly.


9.6  Importing Data Files

WinIDAMS provides a tool for importing data files to IDAMS directly through the WinIDAMS User Interface. This facility can be accessed in the WinIDAMS Main window, the Data window and the Multidimensional Tables window.

Three types of free format files can be imported:

Information provided in the first row is considered to be column labels and is used as variable names during the dictionary construction process. Thus, the presence of column labels is mandatory in the first row of input files.

Also the separation character is determined from the first line while the character used as decimal separator is detected from the second line (first data line) of the file. Thus, if a variable is expected to have decimal values, it should be shown in the first data line.

During the import process, contents of imported alphabetic variables can be changed to numeric codes, keeping the alphabetic values as code labels in the created IDAMS dictionary. Commas used as decimal separator for numeric variables are changed to points.

The Data Import operation is activated with the command File/Import, followed by selection of required file in the standard file Open dialogue box. The separation character and the character used as decimal separator are displayed together with values of all fields for the first three cases. Data reading can then be checked before launching the import. Afterwards, you are provided with two windows called External data and Variables Definition, both having form of a spreadsheet.

The External data window only displays the contents of the file to import. No editing operations are allowed, except copying a selection to the Clipboard.

The Variables Definition window serves for preparing IDAMS variable descriptions. Its initial content is provided by default and on the basis of the imported data, but you are free to change and to complete it as necessary.

The columns contain the following information:

Description 
Variable name.
Type 
Type of variable (numeric by default). This is the input variable type. If an input variable is alphabetic and should be output as numeric, ask for recoding (see below).
MaxWidth 
Maximum field width of the variable.
NumDec 
Number of decimal places; blank implies no decimal places.
Md1 
First missing data code for numeric variables.
Md2 
Second missing data code for numeric variables.
Recoding 
Requesting a recoding of alphabetic variables to numeric values.
To modify variable definitions, place the cursor inside the window. Then use the navigation keys or the mouse to move to the required field and change its contents.

Use the menu command Build/IDAMS Dataset to create IDAMS Dictionary and Data files. They will both be placed in the Data folder of the current application.


9.7  Exporting IDAMS Data Files

WinIDAMS also has a tool for exporting IDAMS Data files directly through the WinIDAMS User Interface. This can be done from the Data window using the command File/Export. The IDAMS Data file displayed in the active window can be saved in one of the three types of free format data files:

Variable names from the corresponding Dictionary file are output in the first row of the exported data as column labels.

If code labels exist for a variable, numeric code values can be optionally replaced by their corresponding code label in the output data file. Moreover, numeric variables can be output with comma used as decimal separator.


9.8  Creating/Updating/Displaying Setup Files

The Setup window to prepare or to display an IDAMS Setup file is called when:


The window provides two panes: the top one is for preparing the Setup file itself (Setup pane) and the bottom one for displaying error messages when filter and Recode statements are checked (Messages pane). Only the Setup pane can be edited. Note that IDAMS commands are displayed in bold and program names in pink if they are spelled correctly. Text put on a $comment command is displayed in green.

To prepare a new program setup, you can either type in all statements or you can use the prototype setup for the required program and modify it as necessary. Prototype setups are provided for all programs. They can be accessed by selecting the program name in the list under the toolbar button Prototype. To copy the prototype to the Setup pane, click the required program name. For details on how to prepare setups, see the chapter "The IDAMS Setup File" and the relevant program write-up.

Editing operations can be performed as with any ASCII file editor, i.e. you can Cut, Copy and Paste any selection, using the Edit commands, equivalent toolbar buttons or shortcut keys Ctrl/X, Ctrl/C and Ctrl/V respectively.

Two setup verification commands are provided in the Check menu to allow for syntax verification of sets of Recode statements and filter statements:

Recode Syntax 
activates verification of syntax in Recode statements included in the setup. All errors found are reported in the Messages pane giving the Recode set number, erroneous statement line and character(s) causing the syntax problem. A double-click on the erroneous line text or on the error message in the Message pane shows this line in the Setup pane with a yellow arrow. You can correct the errors and repeat syntax verification, before passing the setup for execution.
Filter Syntax 
activates verification of syntax errors in filter statements included in the setup. All errors found are reported in the Messages pane giving the filter statement number, erroneous statement line and character(s) causing the syntax problem. A double-click on the erroneous line text or on the error message in the Messages pane shows this line in the Setup pane with a yellow arrow.
Note that although most syntax errors in filter and Recode statements can be detected and corrected here, another syntax verification is systematically performed by IDAMS during setup execution. Also execution errors, which cannot be detected here, are reported in the results.


9.9  Executing IDAMS Setups

To execute IDAMS program(s) (for which instructions have been prepared and saved in a Setup file), use the menu command Execute/Select Setup in any WinIDAMS document window. You are asked, through the standard Windows dialogue box, to select the file from which instructions should be taken for execution.

If you are preparing your instructions in the Setup window, you can execute programs from the Current Setup using the menu command Execute/Current Setup.

The program(s) will be executed and the results written to the file specified for PRINT under $FILES (the default is IDAMS.LST in the current Work folder). At the end of execution, the Results file will be opened in the Results window.


9.10  Handling Results Files

The Results window to access, display and print selected parts of the results is called when:

Quick navigation in the results is facilitated through their table of contents. You can access the beginning of particular program results or even a particular section. Moreover, the menu Edit provides access to a searching facility.


The window is divided into 3 panes: one showing the table of contents (TOC) of the results as a structure tree, the second displaying the results themselves and the third displaying error messages and warnings included in the results.

By default, the pagination of results done by programs is retained (the Page Mode option in the check box of View menu is marked). To make the results more compact, unmark this option. Trailing blank lines will be removed from all pages and page breaks inserted by programs will be replaced by "Page break" text line.

To open/close quickly the TOC tree, three buttons on the numeric pad are available:

*  
opens all levels of the tree under the selected node
-  
closes all levels of the tree under the selected node
+  
opens one level under the selected node.

To view a particular part of the results, double-click on its name in the TOC.

To locate an error message or a warning, double-click its text.

Modification of the results is not allowed. However, selected parts (highlighted or marked in tick-boxes in the TOC tree) or all the results can be copied to the Clipboard (Edit/Copy command, Ctrl/C or Copy button in the toolbar) and pasted to any document using standard Windows techniques.

Printing the whole contents or selected pages of the results can be done through the menu command File/Print or using the Print toolbar button. Note that printing is done in Landscape orientation, and this orientation cannot be changed.

The contents of the Results file as displayed can be saved in RTF or in text format using the menu command File/Save As. Trailing blank lines are always removed. Page breaks are handled according to the Page Mode option.


9.11  Creating/Updating Text and RTF Format Files

WinIDAMS has a General Editor which allows you to open and modify any type of document in character format. However, its basic function is to provide a facility for editing Text files and to offer sophisticated formatting and editing features. Manipulation of Dictionary, Data or Setup files using the General Editor should be avoided, and manipulation of Matrix files should be performed with caution.

The Text window is called when:


The General Editor provides a number of standard editing commands which are known to Windows users. They are listed below but will not be described in detail.

Insert provides commands for inserting page and section breaks, picture, OLE object (Object Linking & Embedding), frame and drawing object.

Font commands allow you to change font and colour of selected text, and the colour of its background.

Paragraph commands enable you user to align paragraphs differently, to indent them, to display them in double space, and to draw a border around and shade the background.

Table gives access to a number of commands to insert and manipulate tables.

View contains three additional commands to display the active document in page mode, to display the ruler and the paragraph marker.

Formatting toolbar allows you to choose quickly formatting commands that are used most frequently.