turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Make two datasets match by shifting one along x-ax...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 30, 2015 2:05 PM
(430 views)

I have two datasets, each of which consists of a number of (x,y) pairs. Both have a similar shape when y is plotted vs x, but they are shifted along the x-axis with respect to each other. I would like to find the offset in x required to make the two datasets overlap (see attached images).

Is there an elegant way to do this in JMP? I could write a loop that shifts one dataset by small increments and calculate the xi^2 between the two for each iteration to find which offset gives the best match, but I was wondering if there was a smarter way of doing it.

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 1, 2015 10:04 AM
(276 views)

I don't think you have overlooked anything that's built in.

Useful prescriptions probably depend on what you can and can't assume about the data, and what figure of merit to use:

- Would you expect each sample to have the same number of (x, y) pairs?
- Is it possible that one or more x or y value is missing?
- How would you wish to quantify 'degree of overlap'?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 2, 2015 12:32 AM
(276 views)

Ian,

- Not necessarily
- Yes
- I was thinking of starting with the smaller dataset (i.e. fewer x/y pairs) and calculating the squared difference between each of its datapoints and the (interpolated) y value of the 2nd dataset at the same x value. The x offset between the two datasets where this value becomes a minimum should correspond to best overlap. It shouldn't be too hard to script this, but before doing so, I thought I'd ask if JMP has a built-in function to achieve this goal.

Thanks,

Marcus