cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
LukasKuerten
Level I

Prediction profiler does not work if formula contains row statement

Hi, 

I can't get the prediction profiler to display predictions if my formula contains a Row() statement. 

 

MWE:

 

the Formula for Column5:

 

:x

 

works fine:

 

LukasKuerten_0-1657710415041.png

 

 

 

while the formula for Column4:

:x[Row()]

 

results in the prediction not being computed:

 

LukasKuerten_1-1657710448338.png

 

Obviously I wouldn't need the Row() statement in the above MWE, but I've run into this problem while trying to build something somewhat more involved. I'm using JMP 16.12.0

 

Cheers,

Lukas

4 REPLIES 4

Re: Prediction profiler does not work if formula contains row statement

The Row() function used as a right-hand value will return a constant, invalid row number (0). It is meant to be used as a right-hand value in the argument to the For Each Row() function.

 

See help about iterating over rows.

 

What are you trying to do? In what way is a row number important to your purpose?

LukasKuerten
Level I

Re: Prediction profiler does not work if formula contains row statement

I'm using the Row() function in the formula for a formula column, not in a standalone script. Shouldn't Row() return a value for each cell in this case?

 

The formula column I'm trying to profile calculates the cumulative sum / numeric integral of column x up to that row. I've both tried the built-in Col Cumulative Sum function and explicitly programmed the iterative solution int_i = int_{i-1} + x_i , but neither work with the profiler.

Re: Prediction profiler does not work if formula contains row statement

Yes, the Row() function will return the current row in a column formula.

 

So your formula looks something like this one?

 

If(
	Row() == 1,
		:x,
	:x + Lag( :x )
);
LukasKuerten
Level I

Re: Prediction profiler does not work if formula contains row statement

Exactly, except it's Lag(:integral)   (i.e. the column itself), not Lag (:x)