cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Do you use lag(x)?

hogi_2-1736536615203.png

... seems that this is no longer possible: 

hogi_0-1736574848597.png

tested with JMP18.1.1

 

JMP17:

hogi_3-1736536719759.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
hogi
Level XIII

Re: Do you use lag(x)?

The good thing:
It's not a general issue of "Lag"

... it seems to be caused by:

hogi_1-1736578008881.png

 

When I generate the Formula this way, the entries are empty.
When I create a new column and add the formula afterwards, the values are calculated.

 

added: video with different ways to generate the formula column

  1. new formula column: add lag via click      -> fail
  2. new formula column: add lag manually    ->  fail
  3. new formula column: delete code and write again    -> fail
  4. new column -> add formula manually -> works
  5. new column -> add formula column via click and write (like #2) -> works

(view in My Videos)

 

 

View solution in original post

jthi
Super User

Re: Do you use lag(x)?

Seems like JMP will incorrectly evaluate the "missing" argument to Empty()

// Transform column
Data Table("Big Class") << Apply Formula(
	Columns(:weight),
	Formula(Lag(:weight, Empty())),
	Output(New Formula)
);

If you use Lag under Row this doesn't happen as it uses other method to create the column

// New formula column: Lag[weight]
Data Table("Big Class") << New Formula Column(
	Operation(Category("Row"), "Lag"),
	Columns(:weight)
);

 

Edit: And it does happen with other functions too (at least with Dif but there could be other)

// Transform column
Data Table("Big Class") << Apply Formula(
	Columns(:weight),
	Formula(Dif(:weight, Empty())),
	Output(New Formula)
);
-Jarmo

View solution in original post

6 REPLIES 6
Jeff_Perkinson
Community Manager Community Manager

Re: Do you use lag(x)?

Seems to work fine in all the versions I tried, including 18.1.1.

2025-01-10_17-05-01.034.png

-Jeff
hogi
Level XIII

Re: Do you use lag(x)?

Ok, good.

And kind of strange ...

So, it's neither 100% gone - nor 100% working.
what makes the difference ?

PC vs. Mac?
... I will check my preferences - and compare with more colleagues.

hogi
Level XIII

Re: Do you use lag(x)?

The good thing:
It's not a general issue of "Lag"

... it seems to be caused by:

hogi_1-1736578008881.png

 

When I generate the Formula this way, the entries are empty.
When I create a new column and add the formula afterwards, the values are calculated.

 

added: video with different ways to generate the formula column

  1. new formula column: add lag via click      -> fail
  2. new formula column: add lag manually    ->  fail
  3. new formula column: delete code and write again    -> fail
  4. new column -> add formula manually -> works
  5. new column -> add formula column via click and write (like #2) -> works

(view in My Videos)

 

 

hogi
Level XIII

Re: Do you use lag(x)?

I submitted a ticket to JMP support: TS-00182750
let's see ...

jthi
Super User

Re: Do you use lag(x)?

Seems like JMP will incorrectly evaluate the "missing" argument to Empty()

// Transform column
Data Table("Big Class") << Apply Formula(
	Columns(:weight),
	Formula(Lag(:weight, Empty())),
	Output(New Formula)
);

If you use Lag under Row this doesn't happen as it uses other method to create the column

// New formula column: Lag[weight]
Data Table("Big Class") << New Formula Column(
	Operation(Category("Row"), "Lag"),
	Columns(:weight)
);

 

Edit: And it does happen with other functions too (at least with Dif but there could be other)

// Transform column
Data Table("Big Class") << Apply Formula(
	Columns(:weight),
	Formula(Dif(:weight, Empty())),
	Output(New Formula)
);
-Jarmo
hogi
Level XIII

Re: Do you use lag(x)?

Good point, thanks @jthi for digging deeper.

 

I never paid attention and noticed the 2 ways formula editor displays optional arguments:

  1. explicit:
    hogi_1-1736585128111.png

  2. not [just in the description]:
    hogi_0-1736585047899.png

Recommended Articles