Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level II

## 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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

## 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 .

-Jeff
4 REPLIES 4
Highlighted
Community Manager

## 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 .

-Jeff
Highlighted
Level II

Thanks Jeff.

Highlighted
Super User

## 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]``
Jim
Highlighted
Super User

## 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.

-Dave
Article Labels