- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Is there Lead () function in JMP?
There is Lag() function in JMP which is intended to provide data values from preceding records in a data set.
Is there Lead() function in JMP? or any similar function that I can use?
What I am currently doing is to sort a data set in descending order and then apply lag functions to create lead values. Afterward the data are sorted a second time, back to original order, before any analysis is done.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Is there Lead () function in JMP?
You can use a negative number in the second argument to lag to indicate forward lag instead of backward. For example the formula:
Lag(:a, -1)
results in this table:
a |
Lag(:a, -1) |
57 |
61 |
61 |
91 |
91 |
8 |
8 |
70 |
70 |
9 |
9 |
99 |
99 |
37 |
37 |
16 |
16 |
89 |
89 |
. |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Is there Lead () function in JMP?
You can use a negative number in the second argument to lag to indicate forward lag instead of backward. For example the formula:
Lag(:a, -1)
results in this table:
a |
Lag(:a, -1) |
57 |
61 |
61 |
91 |
91 |
8 |
8 |
70 |
70 |
9 |
9 |
99 |
99 |
37 |
37 |
16 |
16 |
89 |
89 |
. |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Is there Lead () function in JMP?
Thanks Jeff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Is there Lead () function in JMP?
Being an Old Schooler, I have a tendency to use subscripting, so my formula for this would be
:a[Row() + 1]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Is there Lead () function in JMP?
Have you tried using the Lag function with a negative value for the lag parameter? Just a thought.