Creating a new variable from previous ones
I am creating an experiment that consists of repeating the order in which some squares are illuminated in a 5 square template. The participant has to repeat the same exact order in which the squares are shown.
I need three specific variables. The first one, correct or incorrect for each response. I mean, If the order is 2-5-1 and the participant answers 2-3-2, the variable has to show 1-0-0 or correct, incorrect, incorrect. The second one, correct or incorrect for each sequence. If there is at least one mistake, the entire sequence must be qualified as incorrect. Finally, there are eight levels, each one with four sequences. The third variable, correct or incorrect for each level. If there is at least one correct sequence, the entire level must be qualified as correct. I know how to create and measure the first one, but not how to construct the second one and the third one from its previous variables.
Another doubt is how to create an if statement that stops the experiment if the level is incorrect. I mean, the experiment has to end after an incorrect level.
Thank you so much, I hope you can help me.