I'm asking this question here with the hopes of getting positive feedback from expert modelers. If this is not an appropriate forum for this question, please let me know. I have asked this question almost an year ago on cross validated as well but didn't get any replies.
Thank you for your time.
Background
I want to model the lane change duration (outcome variable) given the input features such as the speed of car, distance from the lead car in current lane as well as target lane, etc. This is an interesting problem as the outcome variable i.e. lane change duration is a constant value for a given lane change maneuver. However, the features e.g. speed of the car continuously varies during the maneuver.
I have been reviewing various modelling approaches e.g. mixed effects models, etc. but am not sure what modelling approach would be most appropriate in this context.
Example data
Following are sample data for 2 cars (each driven by a different driver). You can see, for instance, that Car1
changed lanes twice, the first maneuver was 5 s long while the second was 8 s long. It is evident that for a given lane change, the LC_duration
remains the same but the speed
varies. If I want to fit a model on these data that predicts LC_duration
based on the speed
feature, what would the appropriate modelling technique?
df <- structure(list(driver = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Car1",
"Car2"), class = "factor"), gender = structure(c(2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L), .Label = c("Female", "Male"), class = "factor"), speed = c(40.5,
40.5, 40.7, 41, 41, 38.9, 38.6, 38.8, 39, 39.1, 55, 55, 55, 55.2,
55.3, 25, 25.3, 25.6, 25.6, 25.7), age = c(25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30),
LC_maneuver = structure(c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L,
2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), class = "factor", .Label = c("lane_change1",
"lane_change2")), status = structure(c(3L, 1L, 1L, 1L, 2L,
3L, 1L, 1L, 1L, 2L, 3L, 1L, 1L, 1L, 2L, 3L, 1L, 1L, 1L, 2L
), .Label = c("changing lane", "End_of_LC", "Start_of_LC"
), class = "factor"), LC_duration = c(5, 5, 5, 5, 5, 8, 8,
8, 8, 8, 3, 3, 3, 3, 3, 11, 11, 11, 11, 11)), .Names = c("driver",
"gender", "speed", "age", "LC_maneuver", "status", "LC_duration"
), row.names = c(NA, -20L), class = "data.frame")