Introduction
This article describes how to link different data sets together in a single document. This allows users to crosstab questions from two different data files, provided those files have a data file relationship that tells Displayr how the observations relate to each other.
This works the same way as if you merged your data files by appending the variables from the second data set to the first one by matching on record id, for example. It is not, however, a substitute for analyzing wave on wave data whereby your data files need to be merged into a single data set by adding cases.
Requirements
- At least 2 data sets loaded in Displayr in your Data Sets tree that share common records.
- A variable in both files which contains the same type of data (text, categorical, dates, etc.) and has some values which match.
Method
1. Select any data source folder name in your Data Sets tree.
2. In the object inspector click Edit relationships. This dialog will show a list of the current data file relationships.
3. Click New to add a new relationship.
4. Select the names of each data set to link.
5. Set the variable that appears in both data sets to match on.
6. Select the appropriate Relationship type.
- One to one is where each single value in the left variable matches exactly to a single value in the right variable.
- One to many is where a single value in the left variable matches multiple values in the right variable, for example, a stacked file.
- Many to one is where 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 is where multiple values in the left variable match multiple values in the right variable, resulting in Data Fusion.
7. Choose what to do 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 until you either fix the data or come back to this screen and select another option.
8. OPTIONAL: If matching on a date variable, you can group dates under Match dates that fall in the same according to year, month, week or day.
9. When the relationship between the files is Many to many, you may choose which data file is the Recipient.
10. Press OK to save the relationship.
11. OPTIONAL: To delete a relationship, move the mouse over the relationship, and then click on the Delete button which appears to the right.
12. OPTIONAL: To edit a relationship, move the mouse over the relationship, and then click on the Edit button which appears to the right.
13. Press OK to return to your document.
See Also
Comments
0 comments
Article is closed for comments.