Hello All, I think there's a simple solution to this, but nothing I’ve tried is panning out. The problem: I have repeated measures (test trials) for each individual (i.e., case). They are stacked in a long format(see below). Not every individual has the same number of observations. They range from 0 to 48, where 0 represents those who failed practice trials and thus didn’t progress onto subsequent trials (e.g., id = 1). 48 represents those who made it to the end of all possible trials (e.g., id = 3). Other individuals were kicked out somewhere between 0 and 48 trials (e.g., Id = 2). I’d like 48 rows for every case, where trials that occur after the case was kicked out are treated as incorrect (i.e., correct = 0). Any thoughts or suggestions would be much appreciated. Thank you in advance. -dan What I have: ID Correct 1 . 2 1 2 1 2 0 2 1 3 1 3 1 3 1 3 1 3 1 3 0 3 … 3 …48 total rows What I want: ID Correct 1 0 1 0 1 …0 1 …48 total rows 2 1 2 1 2 0 2 1 2 …0 2 …48 total rows 3 1 3 1 3 1 3 1 3 0 3 … 3 …48 total rows
... View more