Table Splicing
(New to Analytica 4.0)
Splicing Overview
Analytica 4.0 contains several new and powerful features that allow you to base Edit Tables, DetermTables and ProbTables on computed indexes. When these indexes change, the elements of the table are automatically adjusted. In the process, some slices may be added, some deleted, and some slices may be re-ordered. This process is called "Splicing".
From ADE, when index definitions change, this same splicing functionality updates table definitions automatically, something that did not occur earlier versions of ADE.
When a computed index changes, there may be correspondence ambiguity -- i.e., there may be an inherent ambiguity in how the previous values map to the new values. This impacts how tables are spliced, and how much data gets lost. You can specify whether an index should be positionally corresponded, associationally corresponded, or flexibly corresponded.
Analytica 4.0 also introduces a new SubTable function, which allows you to display a portion of a table as if it were its own edit table, but where changes to the SubTable actually cause the values in the main table to be changed. The slices (rows/cols) of the subtable may even re-ordered, and the values may appear in input controls on a diagram.
When new slices are added to an index, so that new cells are added to tables based on that index, you can control what values the new cells receive. It is even possible to specify a different cell default for each column (and these may include choice pulldowns). One option (new to 4.0) are blank cells (no contents), such that the new table cells have nothing in them. Blank cells receive some special treatment.
Finally, if you need to highly optimize model startup time, you can take advantage of commands that force tables to be spliced immediately. Doing this prior to saving your model means splicing will not have to occur when the user of your model accesses or evaluates the tables.
Tables Based on Computed Indexes
As a general rule, it is usually preferable to base Edit Tables on indexes defined as explicit lists. Changes (inserting or deleting elements) to these indexes can then be performed through the Analytica GUI, with no chance of ambiguity.
However, numerous applications do arise in which it is desirable to compute an index. Two common cases are indexes computed from the Concat or Subset functions. In each of these common cases, using a SubTable is generally a better option than basing your table on computed indexes. But should the need arise, you can define a Table, DetermTable or ProbTable on a computed index. A computed index should have an index value that evaluates to a list.
In the case of DetermTables and ProbTables, you can also set the domain of a table variable to an index (an index domain), which is computed. The domain will use the computed index values.
Default Values
Sys_TableCellDefault
The system variable Sys_TableCellDefault contains the scalar default used to populate new table cells when rows/columns/slices are added or inserted into a table. The system variable contains a text value, which is inserted verbatim, and thus should be a valid expression.
Currently this system variable can only be changed using the typescript window. To do this, access the typescript window by pressing CNTL-' (control-appostrophe).
Any of the following typescript commands can be used to change the default cell value, for example to 0, blank (empty), or Null:
Sys_TableCellDefault : 0 Sys_TableCellDefault : Sys_TableCellDefault : Null
Blank (empty) Default Cells
Analytica 4.0 now supports empty cells -- an indication that the table cell hasn't yet been filled in. If you attempt to evaluate a table containing empty cells, a warning is issued. The warning is helpful in identifying table cells that still need to be filled in.
Enable comment auto-refresher