cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
bzanos
Level III

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
Jeff_Perkinson
Community Manager 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

View solution in original post

4 REPLIES 4
Jeff_Perkinson
Community Manager 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
bzanos
Level III

Re: Is there Lead () function in JMP?

Thanks Jeff.

txnelson
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
David_Burnham
Super User (Alumni)

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