Algebraic Methods for Studying Interactions Between Epidemiological Variables