cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Determining delay time between variables using JMP

Hello,

I have different variables (Y1, Y2,) spaced evenly with time (X). I suspect that there is a delay time between the two responses Y1 and Y2 based on the process involved and would like to estimate by how much I must timeshift the data (i.e. what is the delay time) so as to compare Y1 and Y2 at the same row number?

I tried to use the auto-correlation function to determine the periodicity in each variable Y1 and Y2 to extract this information, but did not get very far.

Can anybody provide any suggestions?

Thank you

Anoop

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Determining delay time between variables using JMP

Hello, Anoop --

Maybe this might help with your problem. Here is a simple example where we have two periodic signals, one with a delay of 5 samples:

4030_Screen Shot 2013-08-15 at 9.23.33 AM.png

If we launch the Time Series platform with Series 1 as our Y, Series 2 as the Input List and Time as the X, Time ID like this (as Jeff had suggested):

4031_Screen Shot 2013-08-15 at 9.25.38 AM.png

We can run a cross-corrleation on the signals, by selecting it from under the red triangle:

4032_Screen Shot 2013-08-15 at 9.26.55 AM.png

This will create our Cross Correlation Plots for the Output Series - Series 1. If I right click on the plot, I can select 'Make Into Data Table':

4033_Screen Shot 2013-08-15 at 9.27.37 AM.png

I can see the max cross correlation is at 5 samples, which happens to be the amount that the second signal is delayed. If I plot these data in Graph Builder, I can also visualize this delay as the max of the cross correlation.

4034_Screen Shot 2013-08-15 at 9.32.03 AM.png

So I would conclude my delta between the two signals is 5 samples. From there I would lag my series 2 by 5 samples so that we can perform subsequent analyses. This is a very simple example, but try this workflow with your data and see how it works.

Connect with me on LinkedIn: https://bit.ly/3MWgiXt

View solution in original post

5 REPLIES 5
Jeff_Perkinson
Community Manager Community Manager

Re: Determining delay time between variables using JMP

Hi Anoop,

I'm not sure I understand you fully.

So, is your data like this?

Time (x)Y1Y2

1

.23.56
2.3.45
3.21.35
4.3.34

And, do you want to model Y2 as a function of Time and Y1?

If so, you can use the Time Series platform and use Y2 as your Time Series, Y1 as your Input List and Time as your Time ID.

If I've misunderstood, please give us some more details so we can understand your question more clearly.

Thanks!

-Jeff

-Jeff

Re: Determining delay time between variables using JMP

Hello Jeff,

Thank you very much for your reply.

You are correct about the form of the data. What I want to do, though, is to determine by how much time I should shift Y2 (say, by 4 time units) so that Y1 and the new time-shifted Y2 variable can be analyzed together as a pair i.e. Y1(t) and Y2(t+delta) are now on the same rows and I can then do correlations, partition etc.. I believe that Y2 will be delayed from Y1 because of the time taken for any event to go through the process and want to find out what "delta" should be. An example would be a chemical concentration change that travels through a large tank volume to get from where Y1 is measured to where Y2 is measured.

I used the Time Series platform as you suggested and would like to know how to analyze the results. I tried the ARIMA model fit but do not really know how to use it e.g. what to specify for the (p.d.q) values etc. I am not even sure if that is the right approach to get the answer ("delta") I am looking for.

Any help will be greatly appreciated.

Thank you

Anoop

Re: Determining delay time between variables using JMP

Hello, Anoop --

Maybe this might help with your problem. Here is a simple example where we have two periodic signals, one with a delay of 5 samples:

4030_Screen Shot 2013-08-15 at 9.23.33 AM.png

If we launch the Time Series platform with Series 1 as our Y, Series 2 as the Input List and Time as the X, Time ID like this (as Jeff had suggested):

4031_Screen Shot 2013-08-15 at 9.25.38 AM.png

We can run a cross-corrleation on the signals, by selecting it from under the red triangle:

4032_Screen Shot 2013-08-15 at 9.26.55 AM.png

This will create our Cross Correlation Plots for the Output Series - Series 1. If I right click on the plot, I can select 'Make Into Data Table':

4033_Screen Shot 2013-08-15 at 9.27.37 AM.png

I can see the max cross correlation is at 5 samples, which happens to be the amount that the second signal is delayed. If I plot these data in Graph Builder, I can also visualize this delay as the max of the cross correlation.

4034_Screen Shot 2013-08-15 at 9.32.03 AM.png

So I would conclude my delta between the two signals is 5 samples. From there I would lag my series 2 by 5 samples so that we can perform subsequent analyses. This is a very simple example, but try this workflow with your data and see how it works.

Connect with me on LinkedIn: https://bit.ly/3MWgiXt
SDF1
Super User

Re: Determining delay time between variables using JMP

Hi @Daniel_Valente ,

 

  Thanks for the very nice explanation on how to run an autocorrelation.

 

  I'm having a related, but somewhat more complex issue as the original post.

 

  The issue I have is trying to find the right time lag between QC data that is collected every say, 4 hrs in a day, and production data that is collected on a different time scale. Right now, I am looking at Production data that is gathered every 15 min (this is on things like pump rates, belt speeds, oven temperature, etc.). The QC and production data come from different sources, so I need to join them. I do that, but then get multiple of the same entries for each time from production.

 

For example,

DiedrichSchmidt_0-1614194677557.png

 

And so on. The QC data might be something like, and could be collected on an every 4-hour basis or so:

DiedrichSchmidt_1-1614194708176.png

The problem is when I join the data tables, I end up with multiple of the same entries for Y1 for each time point in the X until it changes time. The joined data table will look something like this:

DiedrichSchmidt_2-1614194886664.png

The problem is when I try to run the time series analysis. JMP complains at me with the following:

DiedrichSchmidt_3-1614194972864.png

Which is true, there are duplicate values as these are measurements QC measurements of the product as well as production data, so one would expect to have duplicate values. Plus, because of how the QC data is joined with the production data, there are repeated QC entries for each 15 min of the production data output until the next entry for the QC data.

 

Is there a way to run an cross-correlation with this kind of data to find out what lag is needed to match the production data with QC data?

 

Any suggestions welcome.

 

Thanks!,

DS

SDF1
Super User

Re: Determining delay time between variables using JMP

Hi @Daniel_Valente ,

 

  I think I found a work-around where I can at least test the cross-correlation between QC data and Production data. After joining the tables, I will have multiple repeat entries of the QC data (since the Production data is collected each 15 min). Using a Row() column as the X, Time ID input and the QC data as Y and Production data as X, then I can generate a cross-correlation table of the QC data with the Production data. The only thing I need to keep in mind is that there will be some correlation in there due to the fact that for several different time events for production, I will have multiple identical entries for QC data. This does result in period structure of the cross-correlation, but it's all due to how the data table has to be joined.

 

  If others have any feedback or thoughts on this to improve, I'd appreciate it.

 

Thanks!,

DS