Hi all,
I've been struggling to find a quick solution for this for a couple of days now so I'm allowing myself to post here to ask for advice!
I have eye-tracking data with about 2800 observations per participant (where each line/observation is gaze data collected from the eye-tracker roughly 17ms apart in time). The eye-tracker software exports a variable called RecordingTimestamp and this has a different (& arbitrary) counter for each participant and I need them to have the same reference counter for all. My idea was to create a new timestamp starting at 0 for each participant that counts up until the end of that participant's observations.
What seemed most intuitive was this:
generate Timestamp = sum(RecordingTimestamp - RecordingTimestamp[_n-1])
and interestingly it does create a timestamp that seems to recognise where one participant ends and another begins, only it does not start at 0 each time. Otherwise, I don't know how to make this command respect the change in participant (by sort?) and start at 0. Any help much appreciated!

I've been struggling to find a quick solution for this for a couple of days now so I'm allowing myself to post here to ask for advice!
I have eye-tracking data with about 2800 observations per participant (where each line/observation is gaze data collected from the eye-tracker roughly 17ms apart in time). The eye-tracker software exports a variable called RecordingTimestamp and this has a different (& arbitrary) counter for each participant and I need them to have the same reference counter for all. My idea was to create a new timestamp starting at 0 for each participant that counts up until the end of that participant's observations.
What seemed most intuitive was this:
generate Timestamp = sum(RecordingTimestamp - RecordingTimestamp[_n-1])
and interestingly it does create a timestamp that seems to recognise where one participant ends and another begins, only it does not start at 0 each time. Otherwise, I don't know how to make this command respect the change in participant (by sort?) and start at 0. Any help much appreciated!
Comment