cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles