cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
tlsimons
Level I

Combining two Data files

Hello Everyone, 

 

I have two separate data files (one for eye movements and one for performance on a task). I want to combine these two data files into one file so that I can analyze them with one another, but am running into troubles on how to get started. 

 

The two data files have nothing but the participant file name in common and have varying amounts of responses per participants (ie. The eye movement data has more responses per participants compared to the task performance file). 

 

I have uploaded the files to this post. 

Guidance would be very helpful!! 

34 REPLIES 34
tlsimons
Level I

Re: Combining two Data files

So the outcome variable is not present within each data file (deviation from screen center) because it is a measure of eye movement variability, hence making not present in the other data file. I need a way to fill the empty cells with NA or something that will allow for the analyses to be run.
dale_lehman
Level VII

Re: Combining two Data files

I've attached a simple example showing 2 ideas that might work.  Once creates a new column to combine responses and the other is the Tabulate script in the table.  See if either of these methods will give you what you want.

tlsimons
Level I

Re: Combining two Data files

Creating a new column is not going to work in this case, because I do not have values to fill into the missing data. I do not know where to find the Tabulate Script method that you are referring to.
dale_lehman
Level VII

Re: Combining two Data files

It is the green arrow at the top left of the data table.  Clicking it will run the script, click on the name and edit it to see the script.

tlsimons
Level I

Re: Combining two Data files

This method still is taking multiple columns and combining them to make a single column. This may have been poor communication on my part. I don't have the same outcome variables in both files, so that is adding a level of difficulty to my merging of data files.
tlsimons
Level I

Re: Combining two Data files

The subject name is present within each of the files (SESSION_LABEL, or something similar to that).
dale_lehman
Level VII

Re: Combining two Data files

Can you provide an example (using the variables in your data sets) of the type of question you wish to analyze?  If all of the eye movement measures are potential explanatory variables for any of the performance measurements, then I do believe you want to join the data sets without dropping any multiples.  Yes, it will explode in size, but that is because you want all of the eye measurements to be available to explain each of the performance measures.  Any particular analysis you want to conduct will probably be easier by Tabulating from that huge data set to get just the inputs and outputs you want to study.  If there is more structure to your analysis than using all potential eye movements to explain all potential performance measures, then that structure needs to be explained and there may well be an easier way to contstruct the data file.

tlsimons
Level I

Re: Combining two Data files

Generally I was looking at eye movements (saccade amplitude, fixation duration, deviation from screen center) within different conditions and cognitive load levels. Then with the combined data set I want to use all of these variables just mentioned plus their performance (average) to see if that is affected or affects eye movements.

Re: Combining two Data files

The key to joining these two tables is what we call unique keys (no pun intended). There has to be a column or combination of columns that can be used as keys to uniquely identify each row in both tables so that each row can be joined to each other where it makes sense.

 

For example: If you have chris listed twice or more in a single column, you will need another column such as age and gender to identify each chris as separate people. Then the other table can have chris and the same columns so that teh columns can be joined at the appropriate rows for each unique individual.

 

To complicated this, I looked at both the data sets provided and there does not seem to be any sets of columns that are obivious to me that would help identify a unqiue row in the tables other than the actual recorded values but they are not the same columns in each table.

 

To make things worse, if you joined one table into the other, you would get repeating values per session label/ID for many of the columns since they are not the same number of rows.

 

Take a look at the online help to see different types of examples and this can give you an idea of what you would need in order to join your two tables. Specifically look at the section titled "To join tables with different numbers of rows and different column names" towards the bottom.

 

https://www.jmp.com/support/help/14/examples-of-joining-data-tables.shtml

 

JMP Query Builder is a possiblity for another tool to use, but the same problem exists. How to match up the rows from each table so when the columns get joined into a new table, they are appropriately associated with each other.

 

Ideally, if you had SESSION LABEL and frame index for each row for both tables, then you could match them up with those two columns. Even if there is missing data for each frame index in one table for some of the rows, that would be OK. Or if one table contains a subset of the frame indicies of the other, then that would be OK as well.

 

I hope that gives some direction.

Chris Kirchberg, M.S.2
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
tlsimons
Level I

Re: Combining two Data files

About the only thing that is the same for both datasets is going to be SESSION_LABEL (i know they may not be labeled the same, but they are the same thing), and condition. The other variables are data file specifc