next up previous contents index
Next: Constructing data for a Up: Constructing data over many Previous: Introductory example

Constructing data from other data

The first form of the syntax for the DATAVEC:  command is used mainly to construct data from other data. The definition part (the right hand side of the ``='' sign) must include at least one data-carrier. The collection of data-carriers in the definition part is then reviewed and the cases for which there are observations on every member of the collection are selected. The definition part is then evaluated for each such case, and this becomes the ``observation'' for this case for the new data-carrier. As an example, suppose that X, Y, and Z are data-carriers with observations defined as in Table 8.2, and suppose that we construct a new data-carrier tex2html_wrap_inline35844 as in the following fragment of code:

BD>datavec : w=x+y/ln (z) tex2html_wrap_inline33712

 

Data-carrier Case selected?
Case X Y Z A B C
1 - 9.1 20 Yes No No
2 15.3 9.2 18 Yes Yes No
3 12.6 9.4 13 Yes Yes Yes
4 - 9.8 - No No No
5 - 9.8 11 No No No
6 11.2 9.7 - Yes Yes Yes
Table 8.2:  Example data-carriers.

Only cases 2 and 3 exist for all three data-carriers in the definition part, and so observations will be constructed for these two cases only; the other cases remaining undefined. On the other hand, the issuing of the following command:

BD>datavec : w=1 tex2html_wrap_inline33712

would result in an error as the definition part contains no data-carriers.


next up previous contents index
Next: Constructing data for a Up: Constructing data over many Previous: Introductory example

David Wooff
Wed Oct 21 15:14:31 BST 1998