I have some video coding data that were coded in 5 minute intervals. The variables I am working with specifically is time when behavior changed (relative to the beginning of the 5 minute video in seconds and milliseconds) has a different number of observations per individual per 5 minutes and the behavior itself. For example:
Participant Time_Relative Behavior
1 0 3
1 123.3 4
1 153.6 1
1 300 4
2 0 5
2 360 3
What I am looking to do is to expand the data so each participant has an equal number of observations (current participant observations range from 3-33) say observations for every .5 second in the five minute video but have the behavior stay the same until the time of change. I've tried multiple PROC EXPAND functions (method=none, from= to=, factor(x,x), etc.) but it keeps either interpolating and creating means for the behavior, or interpolating the time series variable to some strange numbers that don't really make any sense!
For example, I want participant 1 and 2 to have the same number of time observations and behaviors:
Participant Time_elapsed_from_video_start(seconds) Behavior
1 0 3
1 .5 3
1 1 3
1 1.5 3
.
.
.
1 123 4
1 123.5 4
2 0 5
2 .5 5
2 1 5
2 1.5 5
.
.
.
2 123 5
2 123.5 5
(The dots here represent an ellipse to the end of the data for participant 1 and 2 NOT missing data) In the end, I am trying to have 300 observations for each participant with each observation being a half second apart (Rounding the actual observation seconds to their closest half second). The behavior reported would stay the same until the actual change was observed at the closest half second.