Hello All,
I am relatively new to the JMP world and am trying to work through a dataset.
I am in the midst of trying to create a way to measure time within a trial within my data. To do so I have created a Lag variable, which tells me when a new trial starts. I have now been attempting to create a variable that will give me the number of presentations of the manipulation within each trial so that I can then use this to eventually get the measure of time within each trial. I have set this process up as an if, then statement thinking that would work, but I have had no luck getting to the desired end point yet. The current code is below.
If( :Lag1 == 1, 1,
:Lag1 == 0, Empty () )
I want the new variable to be equal to 1 when the Lag1 variable is equal to 1. When Lag1 is equal to 0 I want it to count up until it gets to the next lag1 == 1, in which is should start over with a new counting sequence. I have tried many different functions within the JMP scripts and have lucked out so far.
Any help is greatly appreciated!