Copying and Using Rules from Another File
The analyst notes that the variables in this data file are similar to the variables from another project. The validation rules that are defined for that project are saved as properties of the associated data file and can be applied to this data file by copying the data properties of the file.
- To copy rules from
another file, from the menus choose:
- Choose to copy properties from an external IBM® SPSS® Statistics data file, patient_los.sav. See the topic Sample Files for more information.
- Click Next.
Figure 1. Copy Data Properties, Step 2 (choose variables) These are the variables whose properties you want to copy from patient_los.sav to the corresponding variables in stroke_invalid.sav.
- Click Next.
- In step 3, deselect all properties except Custom Attributes.
- Click Next.
- In step 4, select Custom Attributes.
- Click Finish.
You are now ready to reuse the validation rules.
Figure 2. Validate Data dialog box, Single-Variable Rules tab - To validate the stroke_invalid.sav data by using the copied rules, click the Dialog Recall toolbar button and choose Validate Data.
- Click the Single-Variable Rules tab.
The Analysis Variables list shows the variables that are selected on the Variables tab, some summary information about their distributions, and the number of rules attached to each variable. Variables whose properties were copied from patient_los.sav have rules that are attached to them.
The Rules list shows the single-variable validation rules that are available in the data file. These rules were all copied from patient_los.sav. Note that some of these rules are applicable to variables that did not have exact counterparts in the other data file.
Figure 3. Validate Data dialog box, Single-Variable Rules tab - Select Atrial fibrillation, History of transient ischemic attack, CAT scan result, and Died in hospital and apply the 0 to 1 Dichotomy rule.
- Apply 0 to 3 Categorical to Post-event rehabilitation.
- Apply 0 to 2 Categorical to Post-event preventative surgery.
- Apply Nonnegative integer to Length of stay for rehabilitation.
- Apply 1 to 4 Categorical to Recoded Barthel index at 1 month through Recoded Barthel index at 6 months.
- Click the Save tab.
Figure 4. Validate Data dialog box, Save tab - Select Save indicator variables that record all validation rule violations. This process will make it easier to connect the case and variable that cause single-variable rule violations.
- Click OK.