Find correlation between analyses that were taken from different dates
Feb 12, 2019 6:07 AM(1588 views)
I'm new in working with jmp. I would like to look at the correlation and peerform "fit y by x" analyses for two groups of data. In my experiment these is temperature indication that were taken on specific dates and there pH and O2 concentrations that were analysed at different dates. I need to show correlation between temperature and pH and temperature and O2, to see of there is any effect between groups of these values, however my problem is thats the data I have was taken at different dates.
I though maybe I can devide data to months and look on the average of temperature vs pH / O2 at certain month each time and also to see standart deviation between points at each month. Hiwever I don't know how to perform it in jmp.
There are several methods to align/join data with different dates:
take the last recorded value
find the temperature with the closest date
interpolate (linear or other smooths) the temperature between two dates is no exact match,
impute based upon means.
There are likely other methods. Each of these would require a script to join. I have attached a script a to use the last recorded value. However, it appears you might need to learn a few more JMP basics. Go to Help > Books > Using JMP and I suggest you start with searching for the Excel Wizard, or importing data from Excel using copy and paste.
The attached script can be accomplished using the JMP UI, interactively, except for the copy-down for loop.
Here are the steps achieved by the script:
Read in the Temperature data using the Excel Wizard, make sure the Date is numeric, continuous and has format m/d/y
Read in the Chemistry data using the Excel Wizard, make sure the Date is numeric, continuous and has format m/d/y
Concatenate the two tables, and create a Source column, so you know if the data is from Temperature or from Chemistry.
Sort the new table by :Date (ascendining) and :Source File (descending, so Temperature appears before Chemistry).
The for-loop gets the last temperature and copies is down until it finds a new temperature
Run the Bivariate analysis
JMP takes a little work to get started, but there is a lot of help available.
p.s. You will need to change the path of the Excel file provided by @Olga_Kucher to match your storage or download path.