count_event_by_glm function

count_event_by_glm: function to count event rates or summary metrics for GLM analysis