The good thing:
It's not a general issue of "Lag"
... it seems to be caused by:
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
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)
);
Seems to work fine in all the versions I tried, including 18.1.1.
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.
The good thing:
It's not a general issue of "Lag"
... it seems to be caused by:
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
I submitted a ticket to JMP support: TS-00182750
let's see ...
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)
);
Good point, thanks @jthi for digging deeper.
I never paid attention and noticed the 2 ways formula editor displays optional arguments: