Workspace Node: Merge Cases - Specifications Tab
The Merge Cases workspace node can be accessed from the Feature Finder, ribbon bar, or Node Browser. Double-click the node to display the specifications dialog box.
Output. In this group box, select the variables to merge from the two data files.
- File 1 Variables
- Click this button to display a variable selection dialog box containing variables from the first data file; select the desired variables for the output file.
- File 2 Variables
- Click this button to display a variable selection dialog box containing variables from the second data file; select the desired variables to merge into the output file.
Mode.
- Match by variable name
- Select this check box if you want to rearrange (if necessary) the case data when appending so that the variable names from
File 2 match the variable names in
File 1. For example:
File 1:
File 2:
Output:
Patient ID Gender Breed Last visit Ms. Isabelle 605 FEMALE American Shorthair 6/25/1999 Angel 615 FEMALE Domestic Household 07/13/99 Leave this check box at its default (cleared) if you want to conduct a standard case append where the case data is not arranged to match the variable names between the files.
- Drop unmatching variables
- Select this check box to eliminate variables during the merge process from both data sets that do not have a corresponding variable name in the other data file.
- Match By
- Use the options in this group box to specify how Statistica should handle numeric-text assignment conflicts when merging two files.
- Adjust text-numeric assignments and recode data in both files accordingly
- Select this option button to maintain the external appearance of the variables in the files. The merge process renumbers the numeric values to match the numeric value/text-label assignments found in the
File 1 data file (to which the
File 2 data file is appended). As a result, the merged file will show correctly the text labels from both files, coded (i.e., with "underlying" numeric values) consistent with those that were found in
File 1 prior to the merge operation.
For example, suppose you have two data sets you want to merge, with three distinct text labels in each: Red, Blue, and Yellow. However, the numeric values associated with those text labels are different in the two files, as shown below:
Select the Adjust text-numeric assignments and recode data in both files accordingly option button and click the OK button.
The result is:
Notice how the text labels from File 2 are correctly displayed in the merged file, while the "underlying" numeric values were changed (adjusted) to match the numeric value/text label assignments from File 1. In other words, the conflicts in the numeric value/text label assignments were resolved to preserve (in favor of) the text labels.
- Leave underlying data unchanged and merge respective text labels
- Select this option button if you want the numeric values of the current file to take priority in the newly merged file if there is a numeric-text assignment conflict.
For example, if you merge File 1 and File 2 in the previous example using the Leave underlying data unchanged and merge respective text labels option, the result is:
Notice how the numeric values from File 2 are correctly displayed in the merged file, while the corresponding text values that are displayed now match those found in File 1. In other words, the conflict in the numeric value/text label assignment was resolved to preserve (in favor of) the numeric values.
Options. See Common Options.
OK. Click the OK button to accept all the specifications made in the dialog box and to close it. To view the new spreadsheet, click the icon on the lower-right corner of the Concatenate Variables node.
See also, Home tab.