Data File Relationship
Jump to navigation Jump to search
This window box is used for setting the relationship between two files. It is accessed from Edit Data File Relationships.
How to set the relationship between two files
- Press New Relationship.
- Select the two files that you want to analyze together in the File drop-down menus at the top of the dialog box.
- Select the variable that you wish to use to join the two databases together in the Variable drop-down menu.
- Select the type of Relationship (see below) and any other desired options and press OK twice.
Buttons, options and fields
File The data file which contains the question you want to crosstab.
Variable A variable whose values will match the variable in the other data file. E.g., RespondentID or ResponseDate. Both variables must contain the same type of data (text, categorical, date, etc.).
- One to one Each single value in the left variable matches exactly to a single value in the right variable. E.g., LoyaltyCardID (survey.sav) to LoyaltyCardID (customers.csv).
- One to many A single value in the left variable matches multiple values in the right variable. E.g., VehicleID (business vehicles.sav) to VehicleID (insurance claim experience.sav)
- Many to one Multiple values in the left variable match a single value in the right variable. This is the same type of relationship as one to many, with left and right sides swapped. E.g., VehicleID (insurance claim experience.sav) to VehicleID (business vehicles.sav)
- Many to many Multiple values in the left variable match multiple values in the right variable, resulting in Data Fusion.
When a value is not found in the other data file
- Exclude respondents from the matched data If a respondent's value in the left variable cannot be found in the right variable (or the other way round), the respondent is excluded from the sample.
- Insert missing values into the matched data If a respondent's value in the left variable cannot be found in the right variable (or the other way round), the respondent is included in the sample as missing data (NaN) rather than their actual response data.
- Show a warning message When a respondent's value in the left variable cannot be found in the right variable (or the other way round), a warning is shown and you will not be able to proceed with the crosstab until you either fix the data or come back to this screen and select another option.
- Match dates that fall in the same Year/Month/Week/Day When the date for a respondent in the left variable falls in the same year (or month, week or day) as the date for a respondent in the right variable, the respondents will match. E.g. 2011-10-02 will match 2011-11-26 on the year.
- Diagnostics Checks that the Relationship selected makes sense when applied to the data from the left and right Variables. If the Relationship does make sense, then summary information is shown about the number of matching values in the left and right variables.
When the Relationship between two files is Many to many, you may choose which data file is the recipient. See the Data Fusion article for more information.