I have an issue while creating an overall measure of time. I have attached a screenshot that shows what the data looks like thus far. I need to now create a variable that is called "time in trial" where I basically take the "Nback start" minus the "Nback stop."
More specifically I would need several things to happen.
1. When "Nback # of letters presented" equals 1 the "time in trial" should equal 0. Then as the "Nback # of letters presented" increases the "time in trial" should also increase.
2. This increase should stop when I reach another 1 in "Nback # of letters presented" and start back over at 0 for "time in trial."
Any guidance would be greatly appreciated.