# prepare model specs
model3 <- data.frame(
event = c("encoding", "delay", "response"),
start_time = c(0, 2.65, 12.5),
end_time = c(3, 12.5, 16)
)
model4 <- data.frame(
event = c("fixation", "target", "delay", "response"),
start_time = c(0, 2.5, 2.65, 12.5),
end_time = c(2.5, 3, 12.5, 15.5)
)
model_constraints <- list(model3, model4)
# run autohrf
df <- flanker
autofit <- autohrf(df, model_constraints, tr = 2.5,
population = 2, iter = 2, cores = 1)
# print best models
get_best_models(autofit)
Run the code above in your browser using DataLab