Edit Data File Relationship

From Displayr
Jump to navigation Jump to search

This dialog 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

  1. Select a data file in the Data Sets tree, and then under Properties > GENERAL click Edit relationships.
  2. Press New in the Edit Data File Relationships dialog to create a new relationship, or click on an existing relationship to edit it.
  3. Select the two files that you want to analyze together in the Data set drop-down menus at the top of the dialog box.
  4. Select the variable that you wish to use to join the two databases together in the Variable drop-down menus.
  5. Select the type of relationship and any other desired options and click OK.
  6. You will be brought back to the Edit Data File Relationships dialog. Click OK again to confirm the relationship.

Data File Relationships

Data File Relationships are defined by two variables, the files these variables come from, and the relationship type.

The Files are the data files which contains the variable sets you want to crosstab.

The Variable are the variable whose values will match each other. E.g., RespondentID. Both variables must contain the same type of data (text, categorical, date, etc.).

Relationship Types

One to one: Each single value in the left variable matches exactly to a single value in the right variable.
One to many: A single value in the left variable matches multiple values in the right variable.
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.
Many to many: Multiple values in the left variable match multiple values in the right variable, resulting in Data Fusion

Additional Properties

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.

Recipient When the relationship between two files is Many to many, you may choose which data file is the recipient. See Data Fusion for more information.

Diagnostics

Pressing 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.