glm_main_effects

This repository houses data, analysis code, and figures to accompany a forthcoming manuscript on interpreting results from GLM models of binary and count outcomes.

sample_code_generic.R contains code for simulating data used in the in-text example, as well as code for generating graphics and data for tables.
sample_code_emp_ex.R contains code for analyzing data used in the empirical example, including generating graphics and data for tables.

ex_clean.txt contains a subset of data from a study of college student drinking, as used in example 2. Permission was obtained from the local Human Subjects Division to post these de-identified data online.

ex_clean_QF.txt contains a the same data as above, with quantity/frequency of drinking added.

p_by_x1x2.png is an image file containing Figure 2, generated from sample_code_generic.R. alcons_by_gender.png is an image file containing Figure 3, generated from sample_code_emp_ex.R.