Subscribe Bookmark RSS Feed

Correlating two indicators dependent on same parameter

rahulsmils

Occasional Contributor

Joined:

Sep 23, 2016

Hi all,

 

I am new to jmp. So I am not aware if jmp already have a GUI interface to perform following operation.

Else I will need to script this but I need help understanding most efficient way to do this:

 

I have 2 data tables:

 

dt1 has columns: Distance, Temperature

dt2 has columns: Distance, Cost

 

I want to create a plot of Cost vs. Temperature. 

Only parameter common is Distance but Distance in dt1 is not exactly 1:1 same as with dt2 [Both are numeric but differ in values]

So I will need some interpolation. 

Please let me know the best way to code this.

 

 

 

 

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

A similar question was asked recently about joining data by a timestamp, where the timestamps do not match exactly.  I think it might be your solution

Merge data by time stamp

 

Jim
rahulsmils

Occasional Contributor

Joined:

Sep 23, 2016

Thanks, my data set is a bit more complicated.

The script of timestamps breaks for me.

I will give it a more thorough try.

markbailey

Staff

Joined:

Jun 23, 2011

I am not sure of your final purpose. You might have to use a join if you mean to literally plot observations of temperature and cost that share a common or nearly distance. If instead you simply want to explore and examine the relationship between temperature and cost via distance, what about modeling temperature by distance and modeling cost by distance, saving each model as a column formula, then copying these formulas to the same data table or a new one with a distance column. You could plot temperature and cost as Y against distance as X in Graph Builder now. (Graph Builder does a great job with formulas!) You could also plot temperature against cost directly. You might have to play with the number of rows and increments for distance to get the resolution you want in the plotted curve.

Learn it once, use it forever!